00001 #ifndef __domProfile_common_h__
00002 #define __domProfile_common_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/domFx_common_newparam.h>
00010 #include <dom/domFx_common_color_or_texture.h>
00011 #include <dom/domFx_common_float_or_param.h>
00012 #include <dom/domFx_common_transparent.h>
00013 #include <dom/domExtra.h>
00014 class DAE;
00015
00019 class domProfile_common : public daeElement
00020 {
00021 public:
00022 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::PROFILE_COMMON; }
00023 static daeInt ID() { return 203; }
00024 virtual daeInt typeID() const { return ID(); }
00025 public:
00026 class domTechnique;
00027
00028 typedef daeSmartRef<domTechnique> domTechniqueRef;
00029 typedef daeTArray<domTechniqueRef> domTechnique_Array;
00030
00035 class domTechnique : public daeElement
00036 {
00037 public:
00038 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::TECHNIQUE; }
00039 static daeInt ID() { return 204; }
00040 virtual daeInt typeID() const { return ID(); }
00041 public:
00042 class domConstant;
00043
00044 typedef daeSmartRef<domConstant> domConstantRef;
00045 typedef daeTArray<domConstantRef> domConstant_Array;
00046
00047 class domConstant : public daeElement
00048 {
00049 public:
00050 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::CONSTANT; }
00051 static daeInt ID() { return 205; }
00052 virtual daeInt typeID() const { return ID(); }
00053
00054 protected:
00055 domFx_common_color_or_textureRef elemEmission;
00056 domFx_common_color_or_textureRef elemReflective;
00057 domFx_common_float_or_paramRef elemReflectivity;
00058 domFx_common_transparentRef elemTransparent;
00059 domFx_common_float_or_paramRef elemTransparency;
00060 domFx_common_float_or_paramRef elemIndex_of_refraction;
00061
00062 public:
00067 const domFx_common_color_or_textureRef getEmission() const { return elemEmission; }
00072 const domFx_common_color_or_textureRef getReflective() const { return elemReflective; }
00077 const domFx_common_float_or_paramRef getReflectivity() const { return elemReflectivity; }
00082 const domFx_common_transparentRef getTransparent() const { return elemTransparent; }
00087 const domFx_common_float_or_paramRef getTransparency() const { return elemTransparency; }
00092 const domFx_common_float_or_paramRef getIndex_of_refraction() const { return elemIndex_of_refraction; }
00093 protected:
00097 domConstant(DAE& dae) : daeElement(dae), elemEmission(), elemReflective(), elemReflectivity(), elemTransparent(), elemTransparency(), elemIndex_of_refraction() {}
00101 virtual ~domConstant() {}
00105 virtual domConstant &operator=( const domConstant &cpy ) { (void)cpy; return *this; }
00106
00107 public:
00112 static DLLSPEC daeElementRef create(DAE& dae);
00118 static DLLSPEC daeMetaElement* registerElement(DAE& dae);
00119 };
00120
00121 class domLambert;
00122
00123 typedef daeSmartRef<domLambert> domLambertRef;
00124 typedef daeTArray<domLambertRef> domLambert_Array;
00125
00126 class domLambert : public daeElement
00127 {
00128 public:
00129 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::LAMBERT; }
00130 static daeInt ID() { return 206; }
00131 virtual daeInt typeID() const { return ID(); }
00132
00133 protected:
00134 domFx_common_color_or_textureRef elemEmission;
00135 domFx_common_color_or_textureRef elemAmbient;
00136 domFx_common_color_or_textureRef elemDiffuse;
00137 domFx_common_color_or_textureRef elemReflective;
00138 domFx_common_float_or_paramRef elemReflectivity;
00139 domFx_common_transparentRef elemTransparent;
00140 domFx_common_float_or_paramRef elemTransparency;
00141 domFx_common_float_or_paramRef elemIndex_of_refraction;
00142
00143 public:
00148 const domFx_common_color_or_textureRef getEmission() const { return elemEmission; }
00153 const domFx_common_color_or_textureRef getAmbient() const { return elemAmbient; }
00158 const domFx_common_color_or_textureRef getDiffuse() const { return elemDiffuse; }
00163 const domFx_common_color_or_textureRef getReflective() const { return elemReflective; }
00168 const domFx_common_float_or_paramRef getReflectivity() const { return elemReflectivity; }
00173 const domFx_common_transparentRef getTransparent() const { return elemTransparent; }
00178 const domFx_common_float_or_paramRef getTransparency() const { return elemTransparency; }
00183 const domFx_common_float_or_paramRef getIndex_of_refraction() const { return elemIndex_of_refraction; }
00184 protected:
00188 domLambert(DAE& dae) : daeElement(dae), elemEmission(), elemAmbient(), elemDiffuse(), elemReflective(), elemReflectivity(), elemTransparent(), elemTransparency(), elemIndex_of_refraction() {}
00192 virtual ~domLambert() {}
00196 virtual domLambert &operator=( const domLambert &cpy ) { (void)cpy; return *this; }
00197
00198 public:
00203 static DLLSPEC daeElementRef create(DAE& dae);
00209 static DLLSPEC daeMetaElement* registerElement(DAE& dae);
00210 };
00211
00212 class domPhong;
00213
00214 typedef daeSmartRef<domPhong> domPhongRef;
00215 typedef daeTArray<domPhongRef> domPhong_Array;
00216
00217 class domPhong : public daeElement
00218 {
00219 public:
00220 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::PHONG; }
00221 static daeInt ID() { return 207; }
00222 virtual daeInt typeID() const { return ID(); }
00223
00224 protected:
00225 domFx_common_color_or_textureRef elemEmission;
00226 domFx_common_color_or_textureRef elemAmbient;
00227 domFx_common_color_or_textureRef elemDiffuse;
00228 domFx_common_color_or_textureRef elemSpecular;
00229 domFx_common_float_or_paramRef elemShininess;
00230 domFx_common_color_or_textureRef elemReflective;
00231 domFx_common_float_or_paramRef elemReflectivity;
00232 domFx_common_transparentRef elemTransparent;
00233 domFx_common_float_or_paramRef elemTransparency;
00234 domFx_common_float_or_paramRef elemIndex_of_refraction;
00235
00236 public:
00241 const domFx_common_color_or_textureRef getEmission() const { return elemEmission; }
00246 const domFx_common_color_or_textureRef getAmbient() const { return elemAmbient; }
00251 const domFx_common_color_or_textureRef getDiffuse() const { return elemDiffuse; }
00256 const domFx_common_color_or_textureRef getSpecular() const { return elemSpecular; }
00261 const domFx_common_float_or_paramRef getShininess() const { return elemShininess; }
00266 const domFx_common_color_or_textureRef getReflective() const { return elemReflective; }
00271 const domFx_common_float_or_paramRef getReflectivity() const { return elemReflectivity; }
00276 const domFx_common_transparentRef getTransparent() const { return elemTransparent; }
00281 const domFx_common_float_or_paramRef getTransparency() const { return elemTransparency; }
00286 const domFx_common_float_or_paramRef getIndex_of_refraction() const { return elemIndex_of_refraction; }
00287 protected:
00291 domPhong(DAE& dae) : daeElement(dae), elemEmission(), elemAmbient(), elemDiffuse(), elemSpecular(), elemShininess(), elemReflective(), elemReflectivity(), elemTransparent(), elemTransparency(), elemIndex_of_refraction() {}
00295 virtual ~domPhong() {}
00299 virtual domPhong &operator=( const domPhong &cpy ) { (void)cpy; return *this; }
00300
00301 public:
00306 static DLLSPEC daeElementRef create(DAE& dae);
00312 static DLLSPEC daeMetaElement* registerElement(DAE& dae);
00313 };
00314
00315 class domBlinn;
00316
00317 typedef daeSmartRef<domBlinn> domBlinnRef;
00318 typedef daeTArray<domBlinnRef> domBlinn_Array;
00319
00320 class domBlinn : public daeElement
00321 {
00322 public:
00323 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::BLINN; }
00324 static daeInt ID() { return 208; }
00325 virtual daeInt typeID() const { return ID(); }
00326
00327 protected:
00328 domFx_common_color_or_textureRef elemEmission;
00329 domFx_common_color_or_textureRef elemAmbient;
00330 domFx_common_color_or_textureRef elemDiffuse;
00331 domFx_common_color_or_textureRef elemSpecular;
00332 domFx_common_float_or_paramRef elemShininess;
00333 domFx_common_color_or_textureRef elemReflective;
00334 domFx_common_float_or_paramRef elemReflectivity;
00335 domFx_common_transparentRef elemTransparent;
00336 domFx_common_float_or_paramRef elemTransparency;
00337 domFx_common_float_or_paramRef elemIndex_of_refraction;
00338
00339 public:
00344 const domFx_common_color_or_textureRef getEmission() const { return elemEmission; }
00349 const domFx_common_color_or_textureRef getAmbient() const { return elemAmbient; }
00354 const domFx_common_color_or_textureRef getDiffuse() const { return elemDiffuse; }
00359 const domFx_common_color_or_textureRef getSpecular() const { return elemSpecular; }
00364 const domFx_common_float_or_paramRef getShininess() const { return elemShininess; }
00369 const domFx_common_color_or_textureRef getReflective() const { return elemReflective; }
00374 const domFx_common_float_or_paramRef getReflectivity() const { return elemReflectivity; }
00379 const domFx_common_transparentRef getTransparent() const { return elemTransparent; }
00384 const domFx_common_float_or_paramRef getTransparency() const { return elemTransparency; }
00389 const domFx_common_float_or_paramRef getIndex_of_refraction() const { return elemIndex_of_refraction; }
00390 protected:
00394 domBlinn(DAE& dae) : daeElement(dae), elemEmission(), elemAmbient(), elemDiffuse(), elemSpecular(), elemShininess(), elemReflective(), elemReflectivity(), elemTransparent(), elemTransparency(), elemIndex_of_refraction() {}
00398 virtual ~domBlinn() {}
00402 virtual domBlinn &operator=( const domBlinn &cpy ) { (void)cpy; return *this; }
00403
00404 public:
00409 static DLLSPEC daeElementRef create(DAE& dae);
00415 static DLLSPEC daeMetaElement* registerElement(DAE& dae);
00416 };
00417
00418
00419 protected:
00425 xsID attrId;
00431 domSid attrSid;
00432
00433 protected:
00437 domAssetRef elemAsset;
00438 domConstantRef elemConstant;
00439 domLambertRef elemLambert;
00440 domPhongRef elemPhong;
00441 domBlinnRef elemBlinn;
00445 domExtra_Array elemExtra_array;
00449 daeElementRefArray _contents;
00453 daeUIntArray _contentsOrder;
00454
00458 daeTArray< daeCharArray * > _CMData;
00459
00460
00461 public:
00466 xsID getId() const { return attrId; }
00471 void setId( xsID atId ) { *(daeStringRef*)&attrId = atId; _validAttributeArray[0] = true;
00472 if( _document != NULL ) _document->changeElementID( this, attrId );
00473 }
00474
00479 domSid getSid() const { return attrSid; }
00484 void setSid( domSid atSid ) { *(daeStringRef*)&attrSid = atSid; _validAttributeArray[1] = true; }
00485
00490 const domAssetRef getAsset() const { return elemAsset; }
00495 const domConstantRef getConstant() const { return elemConstant; }
00500 const domLambertRef getLambert() const { return elemLambert; }
00505 const domPhongRef getPhong() const { return elemPhong; }
00510 const domBlinnRef getBlinn() const { return elemBlinn; }
00515 domExtra_Array &getExtra_array() { return elemExtra_array; }
00520 const domExtra_Array &getExtra_array() const { return elemExtra_array; }
00525 daeElementRefArray &getContents() { return _contents; }
00530 const daeElementRefArray &getContents() const { return _contents; }
00531
00532 protected:
00536 domTechnique(DAE& dae) : daeElement(dae), attrId(), attrSid(), elemAsset(), elemConstant(), elemLambert(), elemPhong(), elemBlinn(), elemExtra_array() {}
00540 virtual ~domTechnique() { daeElement::deleteCMDataArray(_CMData); }
00544 virtual domTechnique &operator=( const domTechnique &cpy ) { (void)cpy; return *this; }
00545
00546 public:
00551 static DLLSPEC daeElementRef create(DAE& dae);
00557 static DLLSPEC daeMetaElement* registerElement(DAE& dae);
00558 };
00559
00560
00561 protected:
00567 xsID attrId;
00568
00569 protected:
00570 domAssetRef elemAsset;
00571 domFx_common_newparam_Array elemNewparam_array;
00576 domTechniqueRef elemTechnique;
00580 domExtra_Array elemExtra_array;
00581
00582 public:
00587 xsID getId() const { return attrId; }
00592 void setId( xsID atId ) { *(daeStringRef*)&attrId = atId;
00593 if( _document != NULL ) _document->changeElementID( this, attrId );
00594 }
00595
00600 const domAssetRef getAsset() const { return elemAsset; }
00605 domFx_common_newparam_Array &getNewparam_array() { return elemNewparam_array; }
00610 const domFx_common_newparam_Array &getNewparam_array() const { return elemNewparam_array; }
00615 const domTechniqueRef getTechnique() const { return elemTechnique; }
00620 domExtra_Array &getExtra_array() { return elemExtra_array; }
00625 const domExtra_Array &getExtra_array() const { return elemExtra_array; }
00626 protected:
00630 domProfile_common(DAE& dae) : daeElement(dae), attrId(), elemAsset(), elemNewparam_array(), elemTechnique(), elemExtra_array() {}
00634 virtual ~domProfile_common() {}
00638 virtual domProfile_common &operator=( const domProfile_common &cpy ) { (void)cpy; return *this; }
00639
00640 public:
00645 static DLLSPEC daeElementRef create(DAE& dae);
00651 static DLLSPEC daeMetaElement* registerElement(DAE& dae);
00652 };
00653
00654
00655 #endif