00001 #ifndef __domMaterial_h__ 00002 #define __domMaterial_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/domInstance_effect.h> 00010 #include <dom/domExtra.h> 00011 class DAE; 00012 00016 class domMaterial : public daeElement 00017 { 00018 public: 00019 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::MATERIAL; } 00020 static daeInt ID() { return 120; } 00021 virtual daeInt typeID() const { return ID(); } 00022 protected: // Attributes 00028 xsID attrId; 00032 xsToken attrName; 00033 00034 protected: // Elements 00038 domAssetRef elemAsset; 00042 domInstance_effectRef elemInstance_effect; 00046 domExtra_Array elemExtra_array; 00047 00048 public: //Accessors and Mutators 00053 xsID getId() const { return attrId; } 00058 void setId( xsID atId ) { *(daeStringRef*)&attrId = atId; 00059 if( _document != NULL ) _document->changeElementID( this, attrId ); 00060 } 00061 00066 xsToken getName() const { return attrName; } 00071 void setName( xsToken atName ) { *(daeStringRef*)&attrName = atName;} 00072 00077 const domAssetRef getAsset() const { return elemAsset; } 00082 const domInstance_effectRef getInstance_effect() const { return elemInstance_effect; } 00087 domExtra_Array &getExtra_array() { return elemExtra_array; } 00092 const domExtra_Array &getExtra_array() const { return elemExtra_array; } 00093 protected: 00097 domMaterial(DAE& dae) : daeElement(dae), attrId(), attrName(), elemAsset(), elemInstance_effect(), elemExtra_array() {} 00101 virtual ~domMaterial() {} 00105 virtual domMaterial &operator=( const domMaterial &cpy ) { (void)cpy; return *this; } 00106 00107 public: // STATIC METHODS 00112 static DLLSPEC daeElementRef create(DAE& dae); 00118 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00119 }; 00120 00121 00122 #endif