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 __domMesh_h__ 00010 #define __domMesh_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 00032 class domMesh : public daeElement 00033 { 00034 public: 00035 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::MESH; } 00036 static daeInt ID() { return 614; } 00037 virtual daeInt typeID() const { return ID(); } 00038 00039 protected: // Elements 00043 domSource_Array elemSource_array; 00047 domVerticesRef elemVertices; 00051 domLines_Array elemLines_array; 00056 domLinestrips_Array elemLinestrips_array; 00060 domPolygons_Array elemPolygons_array; 00064 domPolylist_Array elemPolylist_array; 00068 domTriangles_Array elemTriangles_array; 00072 domTrifans_Array elemTrifans_array; 00076 domTristrips_Array elemTristrips_array; 00080 domExtra_Array elemExtra_array; 00084 daeElementRefArray _contents; 00088 daeUIntArray _contentsOrder; 00089 00093 daeTArray< daeCharArray * > _CMData; 00094 00095 00096 public: //Accessors and Mutators 00101 domSource_Array &getSource_array() { return elemSource_array; } 00106 const domSource_Array &getSource_array() const { return elemSource_array; } 00111 const domVerticesRef getVertices() const { return elemVertices; } 00116 domLines_Array &getLines_array() { return elemLines_array; } 00121 const domLines_Array &getLines_array() const { return elemLines_array; } 00126 domLinestrips_Array &getLinestrips_array() { return elemLinestrips_array; } 00131 const domLinestrips_Array &getLinestrips_array() const { return elemLinestrips_array; } 00136 domPolygons_Array &getPolygons_array() { return elemPolygons_array; } 00141 const domPolygons_Array &getPolygons_array() const { return elemPolygons_array; } 00146 domPolylist_Array &getPolylist_array() { return elemPolylist_array; } 00151 const domPolylist_Array &getPolylist_array() const { return elemPolylist_array; } 00156 domTriangles_Array &getTriangles_array() { return elemTriangles_array; } 00161 const domTriangles_Array &getTriangles_array() const { return elemTriangles_array; } 00166 domTrifans_Array &getTrifans_array() { return elemTrifans_array; } 00171 const domTrifans_Array &getTrifans_array() const { return elemTrifans_array; } 00176 domTristrips_Array &getTristrips_array() { return elemTristrips_array; } 00181 const domTristrips_Array &getTristrips_array() const { return elemTristrips_array; } 00186 domExtra_Array &getExtra_array() { return elemExtra_array; } 00191 const domExtra_Array &getExtra_array() const { return elemExtra_array; } 00196 daeElementRefArray &getContents() { return _contents; } 00201 const daeElementRefArray &getContents() const { return _contents; } 00202 00203 protected: 00207 domMesh(DAE& dae) : daeElement(dae), elemSource_array(), elemVertices(), elemLines_array(), elemLinestrips_array(), elemPolygons_array(), elemPolylist_array(), elemTriangles_array(), elemTrifans_array(), elemTristrips_array(), elemExtra_array() {} 00211 virtual ~domMesh() { daeElement::deleteCMDataArray(_CMData); } 00215 virtual domMesh &operator=( const domMesh &cpy ) { (void)cpy; return *this; } 00216 00217 public: // STATIC METHODS 00222 static DLLSPEC daeElementRef create(DAE& dae); 00228 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00229 }; 00230 00231 00232 #endif