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 __domConvex_mesh_h__ 00010 #define __domConvex_mesh_h__ 00011 00012 #include <dae/daeDocument.h> 00013 #include <dom/domTypes.h> 00014 #include <dom/domElements.h> 00015 00016 #include <dom/domSource.h> 00017 #include <dom/domVertices.h> 00018 #include <dom/domLines.h> 00019 #include <dom/domLinestrips.h> 00020 #include <dom/domPolygons.h> 00021 #include <dom/domPolylist.h> 00022 #include <dom/domTriangles.h> 00023 #include <dom/domTrifans.h> 00024 #include <dom/domTristrips.h> 00025 #include <dom/domExtra.h> 00026 class DAE; 00027 00035 class domConvex_mesh : public daeElement 00036 { 00037 public: 00038 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::CONVEX_MESH; } 00039 static daeInt ID() { return 789; } 00040 virtual daeInt typeID() const { return ID(); } 00041 protected: // Attribute 00046 xsAnyURI attrConvex_hull_of; 00047 00048 protected: // Elements 00049 domSource_Array elemSource_array; 00050 domVerticesRef elemVertices; 00051 domLines_Array elemLines_array; 00052 domLinestrips_Array elemLinestrips_array; 00053 domPolygons_Array elemPolygons_array; 00054 domPolylist_Array elemPolylist_array; 00055 domTriangles_Array elemTriangles_array; 00056 domTrifans_Array elemTrifans_array; 00057 domTristrips_Array elemTristrips_array; 00061 domExtra_Array elemExtra_array; 00065 daeElementRefArray _contents; 00069 daeUIntArray _contentsOrder; 00070 00074 daeTArray< daeCharArray * > _CMData; 00075 00076 00077 public: //Accessors and Mutators 00082 xsAnyURI &getConvex_hull_of() { return attrConvex_hull_of; } 00087 const xsAnyURI &getConvex_hull_of() const { return attrConvex_hull_of; } 00092 void setConvex_hull_of( const xsAnyURI &atConvex_hull_of ) { attrConvex_hull_of = atConvex_hull_of; _validAttributeArray[0] = true; } 00097 void setConvex_hull_of( xsString atConvex_hull_of ) { attrConvex_hull_of = atConvex_hull_of; _validAttributeArray[0] = true; } 00098 00103 domSource_Array &getSource_array() { return elemSource_array; } 00108 const domSource_Array &getSource_array() const { return elemSource_array; } 00113 const domVerticesRef getVertices() const { return elemVertices; } 00118 domLines_Array &getLines_array() { return elemLines_array; } 00123 const domLines_Array &getLines_array() const { return elemLines_array; } 00128 domLinestrips_Array &getLinestrips_array() { return elemLinestrips_array; } 00133 const domLinestrips_Array &getLinestrips_array() const { return elemLinestrips_array; } 00138 domPolygons_Array &getPolygons_array() { return elemPolygons_array; } 00143 const domPolygons_Array &getPolygons_array() const { return elemPolygons_array; } 00148 domPolylist_Array &getPolylist_array() { return elemPolylist_array; } 00153 const domPolylist_Array &getPolylist_array() const { return elemPolylist_array; } 00158 domTriangles_Array &getTriangles_array() { return elemTriangles_array; } 00163 const domTriangles_Array &getTriangles_array() const { return elemTriangles_array; } 00168 domTrifans_Array &getTrifans_array() { return elemTrifans_array; } 00173 const domTrifans_Array &getTrifans_array() const { return elemTrifans_array; } 00178 domTristrips_Array &getTristrips_array() { return elemTristrips_array; } 00183 const domTristrips_Array &getTristrips_array() const { return elemTristrips_array; } 00188 domExtra_Array &getExtra_array() { return elemExtra_array; } 00193 const domExtra_Array &getExtra_array() const { return elemExtra_array; } 00198 daeElementRefArray &getContents() { return _contents; } 00203 const daeElementRefArray &getContents() const { return _contents; } 00204 00205 protected: 00209 domConvex_mesh(DAE& dae) : daeElement(dae), attrConvex_hull_of(dae, *this), elemSource_array(), elemVertices(), elemLines_array(), elemLinestrips_array(), elemPolygons_array(), elemPolylist_array(), elemTriangles_array(), elemTrifans_array(), elemTristrips_array(), elemExtra_array() {} 00213 virtual ~domConvex_mesh() { daeElement::deleteCMDataArray(_CMData); } 00217 virtual domConvex_mesh &operator=( const domConvex_mesh &cpy ) { (void)cpy; return *this; } 00218 00219 public: // STATIC METHODS 00224 static DLLSPEC daeElementRef create(DAE& dae); 00230 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00231 }; 00232 00233 00234 #endif