00001 #ifndef __domPolygons_h__ 00002 #define __domPolygons_h__ 00003 00004 #include <dae/daeDocument.h> 00005 #include <dom/domTypes.h> 00006 #include <dom/domElements.h> 00007 00008 #include <dom/domInput_local_offset.h> 00009 #include <dom/domP.h> 00010 #include <dom/domExtra.h> 00011 class DAE; 00012 00019 class domPolygons : public daeElement 00020 { 00021 public: 00022 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::POLYGONS; } 00023 static daeInt ID() { return 29; } 00024 virtual daeInt typeID() const { return ID(); } 00025 public: 00026 class domPh; 00027 00028 typedef daeSmartRef<domPh> domPhRef; 00029 typedef daeTArray<domPhRef> domPh_Array; 00030 00035 class domPh : public daeElement 00036 { 00037 public: 00038 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::PH; } 00039 static daeInt ID() { return 30; } 00040 virtual daeInt typeID() const { return ID(); } 00041 public: 00042 class domH; 00043 00044 typedef daeSmartRef<domH> domHRef; 00045 typedef daeTArray<domHRef> domH_Array; 00046 00051 class domH : public daeElement 00052 { 00053 public: 00054 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::H; } 00055 static daeInt ID() { return 31; } 00056 virtual daeInt typeID() const { return ID(); } 00057 00058 00059 public: //Accessors and Mutators 00064 domList_of_uints& getValue() { return _value; } 00069 void setValue( const domList_of_uints& val ) { _value = val; } 00070 00071 protected: // Value 00075 domList_of_uints _value; 00076 protected: 00080 domH(DAE& dae) : daeElement(dae), _value() {} 00084 virtual ~domH() {} 00088 virtual domH &operator=( const domH &cpy ) { (void)cpy; return *this; } 00089 00090 public: // STATIC METHODS 00095 static DLLSPEC daeElementRef create(DAE& dae); 00101 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00102 }; 00103 00104 00105 00106 protected: // Elements 00110 domPRef elemP; 00115 domH_Array elemH_array; 00116 00117 public: //Accessors and Mutators 00122 const domPRef getP() const { return elemP; } 00127 domH_Array &getH_array() { return elemH_array; } 00132 const domH_Array &getH_array() const { return elemH_array; } 00133 protected: 00137 domPh(DAE& dae) : daeElement(dae), elemP(), elemH_array() {} 00141 virtual ~domPh() {} 00145 virtual domPh &operator=( const domPh &cpy ) { (void)cpy; return *this; } 00146 00147 public: // STATIC METHODS 00152 static DLLSPEC daeElementRef create(DAE& dae); 00158 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00159 }; 00160 00161 00162 protected: // Attributes 00166 xsToken attrName; 00171 domUint attrCount; 00178 xsNCName attrMaterial; 00179 00180 protected: // Elements 00185 domInput_local_offset_Array elemInput_array; 00189 domP_Array elemP_array; 00194 domPh_Array elemPh_array; 00198 domExtra_Array elemExtra_array; 00202 daeElementRefArray _contents; 00206 daeUIntArray _contentsOrder; 00207 00211 daeTArray< daeCharArray * > _CMData; 00212 00213 00214 public: //Accessors and Mutators 00219 xsToken getName() const { return attrName; } 00224 void setName( xsToken atName ) { *(daeStringRef*)&attrName = atName;} 00225 00230 domUint getCount() const { return attrCount; } 00235 void setCount( domUint atCount ) { attrCount = atCount; } 00236 00241 xsNCName getMaterial() const { return attrMaterial; } 00246 void setMaterial( xsNCName atMaterial ) { *(daeStringRef*)&attrMaterial = atMaterial;} 00247 00252 domInput_local_offset_Array &getInput_array() { return elemInput_array; } 00257 const domInput_local_offset_Array &getInput_array() const { return elemInput_array; } 00262 domP_Array &getP_array() { return elemP_array; } 00267 const domP_Array &getP_array() const { return elemP_array; } 00272 domPh_Array &getPh_array() { return elemPh_array; } 00277 const domPh_Array &getPh_array() const { return elemPh_array; } 00282 domExtra_Array &getExtra_array() { return elemExtra_array; } 00287 const domExtra_Array &getExtra_array() const { return elemExtra_array; } 00292 daeElementRefArray &getContents() { return _contents; } 00297 const daeElementRefArray &getContents() const { return _contents; } 00298 00299 protected: 00303 domPolygons(DAE& dae) : daeElement(dae), attrName(), attrCount(), attrMaterial(), elemInput_array(), elemP_array(), elemPh_array(), elemExtra_array() {} 00307 virtual ~domPolygons() { daeElement::deleteCMDataArray(_CMData); } 00311 virtual domPolygons &operator=( const domPolygons &cpy ) { (void)cpy; return *this; } 00312 00313 public: // STATIC METHODS 00318 static DLLSPEC daeElementRef create(DAE& dae); 00324 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00325 }; 00326 00327 00328 #endif