00001 #ifndef __domLight_h__ 00002 #define __domLight_h__ 00003 00004 #include <dae/daeDocument.h> 00005 #include <dom/domTypes.h> 00006 #include <dom/domElements.h> 00007 00008 #include <dom/domAsset.h> 00009 #include <dom/domTargetable_float3.h> 00010 #include <dom/domTargetable_float.h> 00011 #include <dom/domTechnique.h> 00012 #include <dom/domExtra.h> 00013 class DAE; 00014 00020 class domLight : public daeElement 00021 { 00022 public: 00023 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::LIGHT; } 00024 static daeInt ID() { return 92; } 00025 virtual daeInt typeID() const { return ID(); } 00026 public: 00027 class domTechnique_common; 00028 00029 typedef daeSmartRef<domTechnique_common> domTechnique_commonRef; 00030 typedef daeTArray<domTechnique_commonRef> domTechnique_common_Array; 00031 00036 class domTechnique_common : public daeElement 00037 { 00038 public: 00039 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::TECHNIQUE_COMMON; } 00040 static daeInt ID() { return 93; } 00041 virtual daeInt typeID() const { return ID(); } 00042 public: 00043 class domAmbient; 00044 00045 typedef daeSmartRef<domAmbient> domAmbientRef; 00046 typedef daeTArray<domAmbientRef> domAmbient_Array; 00047 00053 class domAmbient : public daeElement 00054 { 00055 public: 00056 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::AMBIENT; } 00057 static daeInt ID() { return 94; } 00058 virtual daeInt typeID() const { return ID(); } 00059 00060 protected: // Element 00065 domTargetable_float3Ref elemColor; 00066 00067 public: //Accessors and Mutators 00072 const domTargetable_float3Ref getColor() const { return elemColor; } 00073 protected: 00077 domAmbient(DAE& dae) : daeElement(dae), elemColor() {} 00081 virtual ~domAmbient() {} 00085 virtual domAmbient &operator=( const domAmbient &cpy ) { (void)cpy; return *this; } 00086 00087 public: // STATIC METHODS 00092 static DLLSPEC daeElementRef create(DAE& dae); 00098 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00099 }; 00100 00101 class domDirectional; 00102 00103 typedef daeSmartRef<domDirectional> domDirectionalRef; 00104 typedef daeTArray<domDirectionalRef> domDirectional_Array; 00105 00114 class domDirectional : public daeElement 00115 { 00116 public: 00117 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::DIRECTIONAL; } 00118 static daeInt ID() { return 95; } 00119 virtual daeInt typeID() const { return ID(); } 00120 00121 protected: // Element 00126 domTargetable_float3Ref elemColor; 00127 00128 public: //Accessors and Mutators 00133 const domTargetable_float3Ref getColor() const { return elemColor; } 00134 protected: 00138 domDirectional(DAE& dae) : daeElement(dae), elemColor() {} 00142 virtual ~domDirectional() {} 00146 virtual domDirectional &operator=( const domDirectional &cpy ) { (void)cpy; return *this; } 00147 00148 public: // STATIC METHODS 00153 static DLLSPEC daeElementRef create(DAE& dae); 00159 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00160 }; 00161 00162 class domPoint; 00163 00164 typedef daeSmartRef<domPoint> domPointRef; 00165 typedef daeTArray<domPointRef> domPoint_Array; 00166 00174 class domPoint : public daeElement 00175 { 00176 public: 00177 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::POINT; } 00178 static daeInt ID() { return 96; } 00179 virtual daeInt typeID() const { return ID(); } 00180 00181 protected: // Elements 00186 domTargetable_float3Ref elemColor; 00192 domTargetable_floatRef elemConstant_attenuation; 00198 domTargetable_floatRef elemLinear_attenuation; 00204 domTargetable_floatRef elemQuadratic_attenuation; 00205 00206 public: //Accessors and Mutators 00211 const domTargetable_float3Ref getColor() const { return elemColor; } 00216 const domTargetable_floatRef getConstant_attenuation() const { return elemConstant_attenuation; } 00221 const domTargetable_floatRef getLinear_attenuation() const { return elemLinear_attenuation; } 00226 const domTargetable_floatRef getQuadratic_attenuation() const { return elemQuadratic_attenuation; } 00227 protected: 00231 domPoint(DAE& dae) : daeElement(dae), elemColor(), elemConstant_attenuation(), elemLinear_attenuation(), elemQuadratic_attenuation() {} 00235 virtual ~domPoint() {} 00239 virtual domPoint &operator=( const domPoint &cpy ) { (void)cpy; return *this; } 00240 00241 public: // STATIC METHODS 00246 static DLLSPEC daeElementRef create(DAE& dae); 00252 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00253 }; 00254 00255 class domSpot; 00256 00257 typedef daeSmartRef<domSpot> domSpotRef; 00258 typedef daeTArray<domSpotRef> domSpot_Array; 00259 00273 class domSpot : public daeElement 00274 { 00275 public: 00276 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::SPOT; } 00277 static daeInt ID() { return 97; } 00278 virtual daeInt typeID() const { return ID(); } 00279 00280 protected: // Elements 00285 domTargetable_float3Ref elemColor; 00291 domTargetable_floatRef elemConstant_attenuation; 00297 domTargetable_floatRef elemLinear_attenuation; 00303 domTargetable_floatRef elemQuadratic_attenuation; 00308 domTargetable_floatRef elemFalloff_angle; 00313 domTargetable_floatRef elemFalloff_exponent; 00314 00315 public: //Accessors and Mutators 00320 const domTargetable_float3Ref getColor() const { return elemColor; } 00325 const domTargetable_floatRef getConstant_attenuation() const { return elemConstant_attenuation; } 00330 const domTargetable_floatRef getLinear_attenuation() const { return elemLinear_attenuation; } 00335 const domTargetable_floatRef getQuadratic_attenuation() const { return elemQuadratic_attenuation; } 00340 const domTargetable_floatRef getFalloff_angle() const { return elemFalloff_angle; } 00345 const domTargetable_floatRef getFalloff_exponent() const { return elemFalloff_exponent; } 00346 protected: 00350 domSpot(DAE& dae) : daeElement(dae), elemColor(), elemConstant_attenuation(), elemLinear_attenuation(), elemQuadratic_attenuation(), elemFalloff_angle(), elemFalloff_exponent() {} 00354 virtual ~domSpot() {} 00358 virtual domSpot &operator=( const domSpot &cpy ) { (void)cpy; return *this; } 00359 00360 public: // STATIC METHODS 00365 static DLLSPEC daeElementRef create(DAE& dae); 00371 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00372 }; 00373 00374 00375 00376 protected: // Elements 00382 domAmbientRef elemAmbient; 00391 domDirectionalRef elemDirectional; 00400 domPointRef elemPoint; 00414 domSpotRef elemSpot; 00418 daeElementRefArray _contents; 00422 daeUIntArray _contentsOrder; 00423 00427 daeTArray< daeCharArray * > _CMData; 00428 00429 00430 public: //Accessors and Mutators 00435 const domAmbientRef getAmbient() const { return elemAmbient; } 00440 const domDirectionalRef getDirectional() const { return elemDirectional; } 00445 const domPointRef getPoint() const { return elemPoint; } 00450 const domSpotRef getSpot() const { return elemSpot; } 00455 daeElementRefArray &getContents() { return _contents; } 00460 const daeElementRefArray &getContents() const { return _contents; } 00461 00462 protected: 00466 domTechnique_common(DAE& dae) : daeElement(dae), elemAmbient(), elemDirectional(), elemPoint(), elemSpot() {} 00470 virtual ~domTechnique_common() { daeElement::deleteCMDataArray(_CMData); } 00474 virtual domTechnique_common &operator=( const domTechnique_common &cpy ) { (void)cpy; return *this; } 00475 00476 public: // STATIC METHODS 00481 static DLLSPEC daeElementRef create(DAE& dae); 00487 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00488 }; 00489 00490 00491 protected: // Attributes 00497 xsID attrId; 00501 xsToken attrName; 00502 00503 protected: // Elements 00507 domAssetRef elemAsset; 00512 domTechnique_commonRef elemTechnique_common; 00517 domTechnique_Array elemTechnique_array; 00521 domExtra_Array elemExtra_array; 00522 00523 public: //Accessors and Mutators 00528 xsID getId() const { return attrId; } 00533 void setId( xsID atId ) { *(daeStringRef*)&attrId = atId; 00534 if( _document != NULL ) _document->changeElementID( this, attrId ); 00535 } 00536 00541 xsToken getName() const { return attrName; } 00546 void setName( xsToken atName ) { *(daeStringRef*)&attrName = atName;} 00547 00552 const domAssetRef getAsset() const { return elemAsset; } 00557 const domTechnique_commonRef getTechnique_common() const { return elemTechnique_common; } 00562 domTechnique_Array &getTechnique_array() { return elemTechnique_array; } 00567 const domTechnique_Array &getTechnique_array() const { return elemTechnique_array; } 00572 domExtra_Array &getExtra_array() { return elemExtra_array; } 00577 const domExtra_Array &getExtra_array() const { return elemExtra_array; } 00578 protected: 00582 domLight(DAE& dae) : daeElement(dae), attrId(), attrName(), elemAsset(), elemTechnique_common(), elemTechnique_array(), elemExtra_array() {} 00586 virtual ~domLight() {} 00590 virtual domLight &operator=( const domLight &cpy ) { (void)cpy; return *this; } 00591 00592 public: // STATIC METHODS 00597 static DLLSPEC daeElementRef create(DAE& dae); 00603 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00604 }; 00605 00606 00607 #endif