//
//  LCShadedMaterialLight.h
//  LogoistCore
//
//  Created by Mendel Kucharzeck on 11.01.12.
//  Copyright (c) 2012 AvisNocturna Software. All rights reserved.
//

#import "LCTimelineAnimateableObject.h"

@class LCShadedMaterial;
@class ANNormalValue;

enum _LCShadedMaterialLight_Mode
{
    LCShadedMaterialLight_Mode_Add = 0,
    LCShadedMaterialLight_Mode_Replace = 1
    
}typedef LCShadedMaterialLight_Mode;

@interface LCShadedMaterialLight : LCTimelineAnimateableObject
{
    ANNormalValue *normal;
    
    float rotatedNormalX;
    float rotatedNormalY;
    float rotatedNormalZ;
    
    id color;
    float cachedComponents[4];
    
    float brightness;
    float focus;
    float clamp;
    float transmittance;
    LCShadedMaterialLight_Mode mode;
    
    LCShadedMaterial *shadedMaterial;
}

- (id) initWithShadedMaterial:(LCShadedMaterial*)m;

- (void) getLightValueForNormalX:(float)nx normalY:(float)ny normalZ:(float)nz red:(float*)r green:(float*)g blue:(float*)b alpha:(float*)a;
- (void) generateRotatedNormalsWithRotation:(float)rotation;    //CALL BEFORE GET LIGHT, EVEN WITH 0

@property (retain) ANNormalValue *normal;

@property (retain) id color;
@property (assign) float brightness;
@property (assign) float focus;
@property (assign) float clamp;
@property (assign) float transmittance;
@property (assign) LCShadedMaterialLight_Mode mode;

- (NSArray*) propertyEditDictionaries;

@property (readonly) NSString *displayName;
- (CGImageRef) icon;
- (id) platformIcon;

@end
