00001 #ifndef __domFx_common_color_or_texture_h__ 00002 #define __domFx_common_color_or_texture_h__ 00003 00004 #include <dae/daeDocument.h> 00005 #include <dom/domTypes.h> 00006 #include <dom/domElements.h> 00007 00008 #include <dom/domExtra.h> 00009 class DAE; 00010 00011 class domFx_common_color_or_texture : public daeElement 00012 { 00013 public: 00014 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::FX_COMMON_COLOR_OR_TEXTURE; } 00015 static daeInt ID() { return 192; } 00016 virtual daeInt typeID() const { return ID(); } 00017 public: 00018 class domColor; 00019 00020 typedef daeSmartRef<domColor> domColorRef; 00021 typedef daeTArray<domColorRef> domColor_Array; 00022 00023 class domColor : public daeElement 00024 { 00025 public: 00026 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::COLOR; } 00027 static daeInt ID() { return 193; } 00028 virtual daeInt typeID() const { return ID(); } 00029 protected: // Attribute 00030 domSid attrSid; 00031 00032 00033 public: //Accessors and Mutators 00038 domSid getSid() const { return attrSid; } 00043 void setSid( domSid atSid ) { *(daeStringRef*)&attrSid = atSid; _validAttributeArray[0] = true; } 00044 00049 domFx_color& getValue() { return _value; } 00054 void setValue( const domFx_color& val ) { _value = val; } 00055 00056 protected: // Value 00060 domFx_color _value; 00061 protected: 00065 domColor(DAE& dae) : daeElement(dae), attrSid(), _value() {} 00069 virtual ~domColor() {} 00073 virtual domColor &operator=( const domColor &cpy ) { (void)cpy; return *this; } 00074 00075 public: // STATIC METHODS 00080 static DLLSPEC daeElementRef create(DAE& dae); 00086 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00087 }; 00088 00089 class domParam; 00090 00091 typedef daeSmartRef<domParam> domParamRef; 00092 typedef daeTArray<domParamRef> domParam_Array; 00093 00094 class domParam : public daeElement 00095 { 00096 public: 00097 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::PARAM; } 00098 static daeInt ID() { return 194; } 00099 virtual daeInt typeID() const { return ID(); } 00100 protected: // Attribute 00101 xsNCName attrRef; 00102 00103 00104 public: //Accessors and Mutators 00109 xsNCName getRef() const { return attrRef; } 00114 void setRef( xsNCName atRef ) { *(daeStringRef*)&attrRef = atRef; _validAttributeArray[0] = true; } 00115 00116 protected: 00120 domParam(DAE& dae) : daeElement(dae), attrRef() {} 00124 virtual ~domParam() {} 00128 virtual domParam &operator=( const domParam &cpy ) { (void)cpy; return *this; } 00129 00130 public: // STATIC METHODS 00135 static DLLSPEC daeElementRef create(DAE& dae); 00141 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00142 }; 00143 00144 class domTexture; 00145 00146 typedef daeSmartRef<domTexture> domTextureRef; 00147 typedef daeTArray<domTextureRef> domTexture_Array; 00148 00149 class domTexture : public daeElement 00150 { 00151 public: 00152 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::TEXTURE; } 00153 static daeInt ID() { return 195; } 00154 virtual daeInt typeID() const { return ID(); } 00155 protected: // Attributes 00156 xsNCName attrTexture; 00157 xsNCName attrTexcoord; 00158 00159 protected: // Element 00160 domExtra_Array elemExtra_array; 00161 00162 public: //Accessors and Mutators 00167 xsNCName getTexture() const { return attrTexture; } 00172 void setTexture( xsNCName atTexture ) { *(daeStringRef*)&attrTexture = atTexture; _validAttributeArray[0] = true; } 00173 00178 xsNCName getTexcoord() const { return attrTexcoord; } 00183 void setTexcoord( xsNCName atTexcoord ) { *(daeStringRef*)&attrTexcoord = atTexcoord; _validAttributeArray[1] = true; } 00184 00189 domExtra_Array &getExtra_array() { return elemExtra_array; } 00194 const domExtra_Array &getExtra_array() const { return elemExtra_array; } 00195 protected: 00199 domTexture(DAE& dae) : daeElement(dae), attrTexture(), attrTexcoord(), elemExtra_array() {} 00203 virtual ~domTexture() {} 00207 virtual domTexture &operator=( const domTexture &cpy ) { (void)cpy; return *this; } 00208 00209 public: // STATIC METHODS 00214 static DLLSPEC daeElementRef create(DAE& dae); 00220 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00221 }; 00222 00223 00224 00225 protected: // Elements 00226 domColorRef elemColor; 00227 domParamRef elemParam; 00228 domTextureRef elemTexture; 00232 daeElementRefArray _contents; 00236 daeUIntArray _contentsOrder; 00237 00241 daeTArray< daeCharArray * > _CMData; 00242 00243 00244 public: //Accessors and Mutators 00249 const domColorRef getColor() const { return elemColor; } 00254 const domParamRef getParam() const { return elemParam; } 00259 const domTextureRef getTexture() const { return elemTexture; } 00264 daeElementRefArray &getContents() { return _contents; } 00269 const daeElementRefArray &getContents() const { return _contents; } 00270 00271 protected: 00275 domFx_common_color_or_texture(DAE& dae) : daeElement(dae), elemColor(), elemParam(), elemTexture() {} 00279 virtual ~domFx_common_color_or_texture() { daeElement::deleteCMDataArray(_CMData); } 00283 virtual domFx_common_color_or_texture &operator=( const domFx_common_color_or_texture &cpy ) { (void)cpy; return *this; } 00284 00285 public: // STATIC METHODS 00290 static DLLSPEC daeElementRef create(DAE& dae); 00296 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00297 }; 00298 00299 00300 #endif