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 __dom141Library_physics_models_h__ 10 #define __dom141Library_physics_models_h__ 11 12 #include <dae/daeDocument.h> 13 #include <1.4/dom/domTypes.h> 14 #include <1.4/dom/domElements.h> 15 16 #include <1.4/dom/domAsset.h> 17 #include <1.4/dom/domPhysics_model.h> 18 #include <1.4/dom/domExtra.h> 19 20 class DAE; 21 namespace ColladaDOM141 { 22 23 /** 24 * The library_physics_models element declares a module of physics_model elements. 25 */ 26 class domLibrary_physics_models : public daeElement 27 { 28 public: getElementType()29 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::LIBRARY_PHYSICS_MODELS; } ID()30 static daeInt ID() { return 724; } typeID()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 * Optional 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 library_physics_models element may contain an asset element. @see 47 * domAsset 48 */ 49 domAssetRef elemAsset; 50 /** 51 * There must be at least one physics_model element. @see domPhysics_model 52 */ 53 domPhysics_model_Array elemPhysics_model_array; 54 /** 55 * The extra element may appear any number of times. @see domExtra 56 */ 57 domExtra_Array elemExtra_array; 58 59 public: //Accessors and Mutators 60 /** 61 * Gets the id attribute. 62 * @return Returns a xsID of the id attribute. 63 */ getId()64 xsID getId() const { return attrId; } 65 /** 66 * Sets the id attribute. 67 * @param atId The new value for the id attribute. 68 */ setId(xsID atId)69 void setId( xsID atId ) { *(daeStringRef*)&attrId = atId; _validAttributeArray[0] = true; 70 if( _document != NULL ) _document->changeElementID( this, attrId ); 71 } 72 73 /** 74 * Gets the name attribute. 75 * @return Returns a xsNCName of the name attribute. 76 */ getName()77 xsNCName getName() const { return attrName; } 78 /** 79 * Sets the name attribute. 80 * @param atName The new value for the name attribute. 81 */ setName(xsNCName atName)82 void setName( xsNCName atName ) { *(daeStringRef*)&attrName = atName; _validAttributeArray[1] = true; } 83 84 /** 85 * Gets the asset element. 86 * @return a daeSmartRef to the asset element. 87 */ getAsset()88 const domAssetRef getAsset() const { return elemAsset; } 89 /** 90 * Gets the physics_model element array. 91 * @return Returns a reference to the array of physics_model elements. 92 */ getPhysics_model_array()93 domPhysics_model_Array &getPhysics_model_array() { return elemPhysics_model_array; } 94 /** 95 * Gets the physics_model element array. 96 * @return Returns a constant reference to the array of physics_model elements. 97 */ getPhysics_model_array()98 const domPhysics_model_Array &getPhysics_model_array() const { return elemPhysics_model_array; } 99 /** 100 * Gets the extra element array. 101 * @return Returns a reference to the array of extra elements. 102 */ getExtra_array()103 domExtra_Array &getExtra_array() { return elemExtra_array; } 104 /** 105 * Gets the extra element array. 106 * @return Returns a constant reference to the array of extra elements. 107 */ getExtra_array()108 const domExtra_Array &getExtra_array() const { return elemExtra_array; } 109 protected: 110 /** 111 * Constructor 112 */ domLibrary_physics_models(DAE & dae)113 domLibrary_physics_models(DAE& dae) : daeElement(dae), attrId(), attrName(), elemAsset(), elemPhysics_model_array(), elemExtra_array() {} 114 /** 115 * Destructor 116 */ ~domLibrary_physics_models()117 virtual ~domLibrary_physics_models() {} 118 /** 119 * Overloaded assignment operator 120 */ 121 virtual domLibrary_physics_models &operator=( const domLibrary_physics_models &cpy ) { (void)cpy; return *this; } 122 123 public: // STATIC METHODS 124 /** 125 * Creates an instance of this class and returns a daeElementRef referencing it. 126 * @return a daeElementRef referencing an instance of this object. 127 */ 128 static DLLSPEC daeElementRef create(DAE& dae); 129 /** 130 * Creates a daeMetaElement object that describes this element in the meta object reflection framework. 131 * If a daeMetaElement already exists it will return that instead of creating a new one. 132 * @return A daeMetaElement describing this COLLADA element. 133 */ 134 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 135 }; 136 137 138 } // ColladaDOM141 139 #endif 140