00001 /* 00002 * Copyright 2006 Sony Computer Entertainment Inc. 00003 * 00004 * Licensed under the MIT Open Source License, for details please see license.txt or the website 00005 * http://www.opensource.org/licenses/mit-license.php 00006 * 00007 */ 00008 00009 #ifndef __domGles_texture_unit_h__ 00010 #define __domGles_texture_unit_h__ 00011 00012 #include <dae/daeDocument.h> 00013 #include <dom/domTypes.h> 00014 #include <dom/domElements.h> 00015 00016 #include <dom/domExtra.h> 00017 class DAE; 00018 00019 class domGles_texture_unit_complexType 00020 { 00021 public: 00022 class domSurface; 00023 00024 typedef daeSmartRef<domSurface> domSurfaceRef; 00025 typedef daeTArray<domSurfaceRef> domSurface_Array; 00026 00027 class domSurface : public daeElement 00028 { 00029 public: 00030 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::SURFACE; } 00031 static daeInt ID() { return 153; } 00032 virtual daeInt typeID() const { return ID(); } 00033 00034 protected: // Value 00038 xsNCName _value; 00039 00040 public: //Accessors and Mutators 00045 xsNCName getValue() const { return _value; } 00050 void setValue( xsNCName val ) { *(daeStringRef*)&_value = val; } 00051 00052 protected: 00056 domSurface(DAE& dae) : daeElement(dae), _value() {} 00060 virtual ~domSurface() {} 00064 virtual domSurface &operator=( const domSurface &cpy ) { (void)cpy; return *this; } 00065 00066 public: // STATIC METHODS 00071 static DLLSPEC daeElementRef create(DAE& dae); 00077 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00078 }; 00079 00080 class domSampler_state; 00081 00082 typedef daeSmartRef<domSampler_state> domSampler_stateRef; 00083 typedef daeTArray<domSampler_stateRef> domSampler_state_Array; 00084 00085 class domSampler_state : public daeElement 00086 { 00087 public: 00088 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::SAMPLER_STATE; } 00089 static daeInt ID() { return 154; } 00090 virtual daeInt typeID() const { return ID(); } 00091 00092 protected: // Value 00096 xsNCName _value; 00097 00098 public: //Accessors and Mutators 00103 xsNCName getValue() const { return _value; } 00108 void setValue( xsNCName val ) { *(daeStringRef*)&_value = val; } 00109 00110 protected: 00114 domSampler_state(DAE& dae) : daeElement(dae), _value() {} 00118 virtual ~domSampler_state() {} 00122 virtual domSampler_state &operator=( const domSampler_state &cpy ) { (void)cpy; return *this; } 00123 00124 public: // STATIC METHODS 00129 static DLLSPEC daeElementRef create(DAE& dae); 00135 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00136 }; 00137 00138 class domTexcoord; 00139 00140 typedef daeSmartRef<domTexcoord> domTexcoordRef; 00141 typedef daeTArray<domTexcoordRef> domTexcoord_Array; 00142 00143 class domTexcoord : public daeElement 00144 { 00145 public: 00146 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::TEXCOORD; } 00147 static daeInt ID() { return 155; } 00148 virtual daeInt typeID() const { return ID(); } 00149 protected: // Attribute 00150 xsNCName attrSemantic; 00151 00152 00153 public: //Accessors and Mutators 00158 xsNCName getSemantic() const { return attrSemantic; } 00163 void setSemantic( xsNCName atSemantic ) { *(daeStringRef*)&attrSemantic = atSemantic; _validAttributeArray[0] = true; } 00164 00165 protected: 00169 domTexcoord(DAE& dae) : daeElement(dae), attrSemantic() {} 00173 virtual ~domTexcoord() {} 00177 virtual domTexcoord &operator=( const domTexcoord &cpy ) { (void)cpy; return *this; } 00178 00179 public: // STATIC METHODS 00184 static DLLSPEC daeElementRef create(DAE& dae); 00190 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00191 }; 00192 00193 00194 protected: // Attribute 00200 xsNCName attrSid; 00201 00202 protected: // Elements 00203 domSurfaceRef elemSurface; 00204 domSampler_stateRef elemSampler_state; 00205 domTexcoordRef elemTexcoord; 00206 domExtra_Array elemExtra_array; 00207 00208 public: //Accessors and Mutators 00213 xsNCName getSid() const { return attrSid; } 00218 void setSid( xsNCName atSid ) { *(daeStringRef*)&attrSid = atSid;} 00219 00224 const domSurfaceRef getSurface() const { return elemSurface; } 00229 const domSampler_stateRef getSampler_state() const { return elemSampler_state; } 00234 const domTexcoordRef getTexcoord() const { return elemTexcoord; } 00239 domExtra_Array &getExtra_array() { return elemExtra_array; } 00244 const domExtra_Array &getExtra_array() const { return elemExtra_array; } 00245 protected: 00249 domGles_texture_unit_complexType(DAE& dae, daeElement* elt) : attrSid(), elemSurface(), elemSampler_state(), elemTexcoord(), elemExtra_array() {} 00253 virtual ~domGles_texture_unit_complexType() {} 00257 virtual domGles_texture_unit_complexType &operator=( const domGles_texture_unit_complexType &cpy ) { (void)cpy; return *this; } 00258 }; 00259 00263 class domGles_texture_unit : public daeElement, public domGles_texture_unit_complexType 00264 { 00265 public: 00266 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::GLES_TEXTURE_UNIT; } 00267 static daeInt ID() { return 156; } 00268 virtual daeInt typeID() const { return ID(); } 00269 00270 public: //Accessors and Mutators 00275 xsNCName getSid() const { return attrSid; } 00280 void setSid( xsNCName atSid ) { *(daeStringRef*)&attrSid = atSid; _validAttributeArray[0] = true; } 00281 00282 protected: 00286 domGles_texture_unit(DAE& dae) : daeElement(dae), domGles_texture_unit_complexType(dae, this) {} 00290 virtual ~domGles_texture_unit() {} 00294 virtual domGles_texture_unit &operator=( const domGles_texture_unit &cpy ) { (void)cpy; return *this; } 00295 00296 public: // STATIC METHODS 00301 static DLLSPEC daeElementRef create(DAE& dae); 00307 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00308 }; 00309 00310 00311 #endif