00001 #ifndef __domGeometry_h__ 00002 #define __domGeometry_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/domConvex_mesh.h> 00010 #include <dom/domMesh.h> 00011 #include <dom/domSpline.h> 00012 #include <dom/domBrep.h> 00013 #include <dom/domExtra.h> 00014 class DAE; 00015 00022 class domGeometry : public daeElement 00023 { 00024 public: 00025 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::GEOMETRY; } 00026 static daeInt ID() { return 364; } 00027 virtual daeInt typeID() const { return ID(); } 00028 protected: // Attributes 00034 xsID attrId; 00038 xsToken attrName; 00039 00040 protected: // Elements 00044 domAssetRef elemAsset; 00048 domConvex_meshRef elemConvex_mesh; 00052 domMeshRef elemMesh; 00053 domSplineRef elemSpline; 00054 domBrepRef elemBrep; 00058 domExtra_Array elemExtra_array; 00062 daeElementRefArray _contents; 00066 daeUIntArray _contentsOrder; 00067 00071 daeTArray< daeCharArray * > _CMData; 00072 00073 00074 public: //Accessors and Mutators 00079 xsID getId() const { return attrId; } 00084 void setId( xsID atId ) { *(daeStringRef*)&attrId = atId; 00085 if( _document != NULL ) _document->changeElementID( this, attrId ); 00086 } 00087 00092 xsToken getName() const { return attrName; } 00097 void setName( xsToken atName ) { *(daeStringRef*)&attrName = atName;} 00098 00103 const domAssetRef getAsset() const { return elemAsset; } 00108 const domConvex_meshRef getConvex_mesh() const { return elemConvex_mesh; } 00113 const domMeshRef getMesh() const { return elemMesh; } 00118 const domSplineRef getSpline() const { return elemSpline; } 00123 const domBrepRef getBrep() const { return elemBrep; } 00128 domExtra_Array &getExtra_array() { return elemExtra_array; } 00133 const domExtra_Array &getExtra_array() const { return elemExtra_array; } 00138 daeElementRefArray &getContents() { return _contents; } 00143 const daeElementRefArray &getContents() const { return _contents; } 00144 00145 protected: 00149 domGeometry(DAE& dae) : daeElement(dae), attrId(), attrName(), elemAsset(), elemConvex_mesh(), elemMesh(), elemSpline(), elemBrep(), elemExtra_array() {} 00153 virtual ~domGeometry() { daeElement::deleteCMDataArray(_CMData); } 00157 virtual domGeometry &operator=( const domGeometry &cpy ) { (void)cpy; return *this; } 00158 00159 public: // STATIC METHODS 00164 static DLLSPEC daeElementRef create(DAE& dae); 00170 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00171 }; 00172 00173 00174 #endif