Light.h

Go to the documentation of this file.
00001 //***************************************************************************************
00002 // File supervisor: Crosswalk team
00012 //***************************************************************************************
00013 
00014 #ifndef _LIGHT_H
00015 #define _LIGHT_H
00016 
00017 #include "Primitive.h"
00018 #include "ConstrainableType.h"
00019 #include "LightInfo.h"
00020 
00026 class XSIEXPORT CSLLight
00027     : public CSLPrimitive
00028     , public CSLConstrainableType
00029 {
00030 public:
00031 
00036     virtual SI_Error Synchronize();
00037 
00042     virtual CSLAnimatableType* ParameterFromName(SI_Char *in_szName);
00043 
00049     virtual CSLAnimatableType* ParameterFromType(EFCurveType in_Type, SI_Char *in_szParameterName);
00050 
00053     virtual ~CSLLight();
00054 
00058     CSIBCColorf GetColor();
00059 
00064     SI_Void SetColor(CSIBCColorf &in_rColor);
00065 
00069     CSIBCVector3D GetPosition();
00070 
00075     SI_Void SetPosition(CSIBCVector3D &in_rValue);
00076 
00081     CSLConstraint* AddConstraint(CSLConstraint::EConstraintType in_ConstraintType);
00082 
00084     // light info Functionality /////////////////////////////////////////////////
00086 
00090     CSLLightInfo* CreateLightInfo();
00091 
00095     SI_Error DestroyLightInfo();
00096 
00101     CSLLightInfo* ConnectLightInfo( CSLLightInfo* in_pToConnect );
00102 
00106     CSLLightInfo* LightInfo();
00107 
00108     CSLColorRGBProxy* GetColorProxy() { return &m_Color;};
00109     CSLVector3DProxy* GetPositionProxy() { return &m_Position;};
00110 
00111 protected:
00112     CSLLight(CSLScene* in_pScene, CSLModel *in_pModel, CdotXSITemplate* in_pTemplate);
00113 
00114     virtual SI_Bool ConstraintTypeIsValid(CSLConstraint::EConstraintType in_ConstraintType) = 0;
00115 
00116 private:
00117     CSLColorRGBProxy m_Color;
00118     CSLVector3DProxy m_Position;
00119     CSLLightInfo *m_pLightInfo;
00120 
00121     void *m_pReserved;  // reserved for future extension
00122 };
00123 
00124 #endif