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 __domInstance_physics_material_h__ 10 #define __domInstance_physics_material_h__ 11 12 #include <dae/daeDocument.h> 13 #include <dom/domTypes.h> 14 #include <dom/domElements.h> 15 16 #include <dom/domInstanceWithExtra.h> 17 class DAE; 18 19 /** 20 * The instance_physics_material element declares the instantiation of a COLLADA 21 * physics_material resource. 22 */ 23 class domInstance_physics_material : public daeElement, public domInstanceWithExtra_complexType 24 { 25 public: 26 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::INSTANCE_PHYSICS_MATERIAL; } 27 static daeInt ID() { return 701; } 28 virtual daeInt typeID() const { return ID(); } 29 30 /** 31 * Gets the url attribute. 32 * @return Returns a xsAnyURI reference of the url attribute. 33 */ 34 xsAnyURI &getUrl() { return attrUrl; } 35 /** 36 * Gets the url attribute. 37 * @return Returns a constant xsAnyURI reference of the url attribute. 38 */ 39 const xsAnyURI &getUrl() const { return attrUrl; } 40 /** 41 * Sets the url attribute. 42 * @param atUrl The new value for the url attribute. 43 */ 44 void setUrl( const xsAnyURI &atUrl ) { attrUrl = atUrl; _validAttributeArray[0] = true; } 45 /** 46 * Sets the url attribute. 47 * @param atUrl The new value for the url attribute. 48 */ 49 void setUrl( xsString atUrl ) { attrUrl = atUrl; _validAttributeArray[0] = true; } 50 51 /** 52 * Gets the sid attribute. 53 * @return Returns a xsNCName of the sid attribute. 54 */ 55 xsNCName getSid() const { return attrSid; } 56 /** 57 * Sets the sid attribute. 58 * @param atSid The new value for the sid attribute. 59 */ 60 void setSid( xsNCName atSid ) { *(daeStringRef*)&attrSid = atSid; _validAttributeArray[1] = true; } 61 62 /** 63 * Gets the name attribute. 64 * @return Returns a xsNCName of the name attribute. 65 */ 66 xsNCName getName() const { return attrName; } 67 /** 68 * Sets the name attribute. 69 * @param atName The new value for the name attribute. 70 */ 71 void setName( xsNCName atName ) { *(daeStringRef*)&attrName = atName; _validAttributeArray[2] = true; } 72 73 protected: 74 /** 75 * Constructor 76 */ 77 domInstance_physics_material(DAE& dae) : daeElement(dae), domInstanceWithExtra_complexType(dae, this) {} 78 /** 79 * Destructor 80 */ 81 virtual ~domInstance_physics_material() {} 82 /** 83 * Overloaded assignment operator 84 */ 85 virtual domInstance_physics_material &operator=( const domInstance_physics_material &cpy ) { (void)cpy; return *this; } 86 87 public: // STATIC METHODS 88 /** 89 * Creates an instance of this class and returns a daeElementRef referencing it. 90 * @return a daeElementRef referencing an instance of this object. 91 */ 92 static DLLSPEC daeElementRef create(DAE& dae); 93 /** 94 * Creates a daeMetaElement object that describes this element in the meta object reflection framework. 95 * If a daeMetaElement already exists it will return that instead of creating a new one. 96 * @return A daeMetaElement describing this COLLADA element. 97 */ 98 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 99 }; 100 101 102 #endif 103