00001 //*************************************************************************************** 00002 // 00003 // File supervisor: Crosswalk team 00004 // 00005 // Copyright 2008 Autodesk, Inc. All rights reserved. 00006 // Use of this software is subject to the terms of the Autodesk license agreement 00007 // provided at the time of installation or download, or which otherwise accompanies 00008 // this software in either electronic or hard copy form. 00009 // 00010 //*************************************************************************************** 00011 00012 #ifndef _LIGHT_H 00013 #define _LIGHT_H 00014 00015 #include "Primitive.h" 00016 #include "ConstrainableType.h" 00017 #include "LightInfo.h" 00018 00022 class XSIEXPORT CSLLight 00023 : public CSLPrimitive 00024 , public CSLConstrainableType 00025 { 00026 public: 00027 00032 virtual SI_Error Synchronize(); 00033 00038 virtual CSLAnimatableType* ParameterFromName(SI_Char *in_szName); 00039 00045 virtual CSLAnimatableType* ParameterFromType(EFCurveType in_Type, SI_Char *in_szParameterName); 00046 00049 virtual ~CSLLight(); 00050 00054 CSIBCColorf GetColor(); 00055 00060 SI_Void SetColor(CSIBCColorf &in_rColor); 00061 00065 CSIBCVector3D GetPosition(); 00066 00071 SI_Void SetPosition(CSIBCVector3D &in_rValue); 00072 00077 CSLConstraint* AddConstraint(CSLConstraint::EConstraintType in_ConstraintType); 00078 00080 // light info Functionality ///////////////////////////////////////////////// 00082 00086 CSLLightInfo* CreateLightInfo(); 00087 00091 SI_Error DestroyLightInfo(); 00092 00097 CSLLightInfo* ConnectLightInfo( CSLLightInfo* in_pToConnect ); 00098 00102 CSLLightInfo* LightInfo(); 00103 00104 CSLColorRGBProxy* GetColorProxy() { return &m_Color;}; 00105 CSLVector3DProxy* GetPositionProxy() { return &m_Position;}; 00106 00107 protected: 00108 CSLLight(CSLScene* in_pScene, CSLModel *in_pModel, CdotXSITemplate* in_pTemplate); 00109 00110 virtual SI_Bool ConstraintTypeIsValid(CSLConstraint::EConstraintType in_ConstraintType) = 0; 00111 00112 private: 00113 CSLColorRGBProxy m_Color; 00114 CSLVector3DProxy m_Position; 00115 CSLLightInfo *m_pLightInfo; 00116 00117 void *m_pReserved; // reserved for future extension 00118 }; 00119 00120 #endif