1 /* 2 * Copyright 2006 Sony Computer Entertainment Inc. 3 * 4 * Licensed under the MIT Open Source License, for details please see license.txt or the website 5 * http://www.opensource.org/licenses/mit-license.php 6 * 7 */ 8 9 #ifndef __domVertices_h__ 10 #define __domVertices_h__ 11 12 #include <dae/daeDocument.h> 13 #include <dom/domTypes.h> 14 #include <dom/domElements.h> 15 16 #include <dom/domExtra.h> 17 #include <dom/domInputLocal.h> 18 class DAE; 19 20 /** 21 * The vertices element declares the attributes and identity of mesh-vertices. 22 * The vertices element describes mesh-vertices in a mesh geometry. The mesh-vertices 23 * represent the position (identity) of the vertices comprising the mesh 24 * and other vertex attributes that are invariant to tessellation. 25 */ 26 class domVertices : public daeElement 27 { 28 public: 29 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::VERTICES; } 30 static daeInt ID() { return 628; } 31 virtual daeInt typeID() const { return ID(); } 32 protected: // Attributes 33 /** 34 * The id attribute is a text string containing the unique identifier of 35 * this element. This value must be unique within the instance document. 36 * Required attribute. 37 */ 38 xsID attrId; 39 /** 40 * The name attribute is the text string name of this element. Optional attribute. 41 */ 42 xsNCName attrName; 43 44 protected: // Elements 45 /** 46 * The input element must occur at least one time. These inputs are local 47 * inputs. @see domInput 48 */ 49 domInputLocal_Array elemInput_array; 50 /** 51 * The extra element may appear any number of times. @see domExtra 52 */ 53 domExtra_Array elemExtra_array; 54 55 public: //Accessors and Mutators 56 /** 57 * Gets the id attribute. 58 * @return Returns a xsID of the id attribute. 59 */ 60 xsID getId() const { return attrId; } 61 /** 62 * Sets the id attribute. 63 * @param atId The new value for the id attribute. 64 */ 65 void setId( xsID atId ) { *(daeStringRef*)&attrId = atId; _validAttributeArray[0] = true; 66 if( _document != NULL ) _document->changeElementID( this, attrId ); 67 } 68 69 /** 70 * Gets the name attribute. 71 * @return Returns a xsNCName of the name attribute. 72 */ 73 xsNCName getName() const { return attrName; } 74 /** 75 * Sets the name attribute. 76 * @param atName The new value for the name attribute. 77 */ 78 void setName( xsNCName atName ) { *(daeStringRef*)&attrName = atName; _validAttributeArray[1] = true; } 79 80 /** 81 * Gets the input element array. 82 * @return Returns a reference to the array of input elements. 83 */ 84 domInputLocal_Array &getInput_array() { return elemInput_array; } 85 /** 86 * Gets the input element array. 87 * @return Returns a constant reference to the array of input elements. 88 */ 89 const domInputLocal_Array &getInput_array() const { return elemInput_array; } 90 /** 91 * Gets the extra element array. 92 * @return Returns a reference to the array of extra elements. 93 */ 94 domExtra_Array &getExtra_array() { return elemExtra_array; } 95 /** 96 * Gets the extra element array. 97 * @return Returns a constant reference to the array of extra elements. 98 */ 99 const domExtra_Array &getExtra_array() const { return elemExtra_array; } 100 protected: 101 /** 102 * Constructor 103 */ 104 domVertices(DAE& dae) : daeElement(dae), attrId(), attrName(), elemInput_array(), elemExtra_array() {} 105 /** 106 * Destructor 107 */ 108 virtual ~domVertices() {} 109 /** 110 * Overloaded assignment operator 111 */ 112 virtual domVertices &operator=( const domVertices &cpy ) { (void)cpy; return *this; } 113 114 public: // STATIC METHODS 115 /** 116 * Creates an instance of this class and returns a daeElementRef referencing it. 117 * @return a daeElementRef referencing an instance of this object. 118 */ 119 static DLLSPEC daeElementRef create(DAE& dae); 120 /** 121 * Creates a daeMetaElement object that describes this element in the meta object reflection framework. 122 * If a daeMetaElement already exists it will return that instead of creating a new one. 123 * @return A daeMetaElement describing this COLLADA element. 124 */ 125 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 126 }; 127 128 129 #endif 130