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 __domGeometry_h__ 00010 #define __domGeometry_h__ 00011 00012 #include <dae/daeDocument.h> 00013 #include <dom/domTypes.h> 00014 #include <dom/domElements.h> 00015 00016 #include <dom/domAsset.h> 00017 #include <dom/domConvex_mesh.h> 00018 #include <dom/domMesh.h> 00019 #include <dom/domSpline.h> 00020 #include <dom/domExtra.h> 00021 class DAE; 00022 00029 class domGeometry : public daeElement 00030 { 00031 public: 00032 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::GEOMETRY; } 00033 static daeInt ID() { return 613; } 00034 virtual daeInt typeID() const { return ID(); } 00035 protected: // Attributes 00041 xsID attrId; 00045 xsNCName attrName; 00046 00047 protected: // Elements 00051 domAssetRef elemAsset; 00055 domConvex_meshRef elemConvex_mesh; 00059 domMeshRef elemMesh; 00060 domSplineRef elemSpline; 00064 domExtra_Array elemExtra_array; 00068 daeElementRefArray _contents; 00072 daeUIntArray _contentsOrder; 00073 00077 daeTArray< daeCharArray * > _CMData; 00078 00079 00080 public: //Accessors and Mutators 00085 xsID getId() const { return attrId; } 00090 void setId( xsID atId ) { *(daeStringRef*)&attrId = atId; _validAttributeArray[0] = true; 00091 if( _document != NULL ) _document->changeElementID( this, attrId ); 00092 } 00093 00098 xsNCName getName() const { return attrName; } 00103 void setName( xsNCName atName ) { *(daeStringRef*)&attrName = atName; _validAttributeArray[1] = true; } 00104 00109 const domAssetRef getAsset() const { return elemAsset; } 00114 const domConvex_meshRef getConvex_mesh() const { return elemConvex_mesh; } 00119 const domMeshRef getMesh() const { return elemMesh; } 00124 const domSplineRef getSpline() const { return elemSpline; } 00129 domExtra_Array &getExtra_array() { return elemExtra_array; } 00134 const domExtra_Array &getExtra_array() const { return elemExtra_array; } 00139 daeElementRefArray &getContents() { return _contents; } 00144 const daeElementRefArray &getContents() const { return _contents; } 00145 00146 protected: 00150 domGeometry(DAE& dae) : daeElement(dae), attrId(), attrName(), elemAsset(), elemConvex_mesh(), elemMesh(), elemSpline(), elemExtra_array() {} 00154 virtual ~domGeometry() { daeElement::deleteCMDataArray(_CMData); } 00158 virtual domGeometry &operator=( const domGeometry &cpy ) { (void)cpy; return *this; } 00159 00160 public: // STATIC METHODS 00165 static DLLSPEC daeElementRef create(DAE& dae); 00171 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00172 }; 00173 00174 00175 #endif