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 __dom141TargetableFloat3_h__ 10 #define __dom141TargetableFloat3_h__ 11 12 #include <dae/daeDocument.h> 13 #include <1.4/dom/domTypes.h> 14 #include <1.4/dom/domElements.h> 15 16 17 class DAE; 18 namespace ColladaDOM141 { 19 20 /** 21 * The TargetableFloat3 type is used to represent elements which contain a 22 * float3 value which can be targeted for animation. 23 */ 24 class domTargetableFloat3_complexType 25 { 26 protected: // Attribute 27 /** 28 * The sid attribute is a text string value containing the sub-identifier 29 * of this element. This value must be unique within the scope of the parent 30 * element. Optional attribute. 31 */ 32 xsNCName attrSid; 33 34 protected: // Value 35 /** 36 * The domFloat3 value of the text data of this element. 37 */ 38 domFloat3 _value; 39 40 public: //Accessors and Mutators 41 /** 42 * Gets the sid attribute. 43 * @return Returns a xsNCName of the sid attribute. 44 */ getSid()45 xsNCName getSid() const { return attrSid; } 46 /** 47 * Sets the sid attribute. 48 * @param atSid The new value for the sid attribute. 49 */ setSid(xsNCName atSid)50 void setSid( xsNCName atSid ) { *(daeStringRef*)&attrSid = atSid;} 51 52 /** 53 * Gets the _value array. 54 * @return Returns a domFloat3 reference of the _value array. 55 */ getValue()56 domFloat3 &getValue() { return _value; } 57 /** 58 * Gets the _value array. 59 * @return Returns a constant domFloat3 reference of the _value array. 60 */ getValue()61 const domFloat3 &getValue() const { return _value; } 62 /** 63 * Sets the _value array. 64 * @param val The new value for the _value array. 65 */ setValue(const domFloat3 & val)66 void setValue( const domFloat3 &val ) { _value = val; } 67 68 protected: 69 /** 70 * Constructor 71 */ domTargetableFloat3_complexType(DAE & dae,daeElement * elt)72 domTargetableFloat3_complexType(DAE& dae, daeElement* elt) : attrSid(), _value() {} 73 /** 74 * Destructor 75 */ ~domTargetableFloat3_complexType()76 virtual ~domTargetableFloat3_complexType() {} 77 /** 78 * Overloaded assignment operator 79 */ 80 virtual domTargetableFloat3_complexType &operator=( const domTargetableFloat3_complexType &cpy ) { (void)cpy; return *this; } 81 }; 82 83 /** 84 * An element of type domTargetableFloat3_complexType. 85 */ 86 class domTargetableFloat3 : public daeElement, public domTargetableFloat3_complexType 87 { 88 public: getElementType()89 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::TARGETABLEFLOAT3; } ID()90 static daeInt ID() { return 5; } typeID()91 virtual daeInt typeID() const { return ID(); } 92 93 public: //Accessors and Mutators 94 /** 95 * Gets the sid attribute. 96 * @return Returns a xsNCName of the sid attribute. 97 */ getSid()98 xsNCName getSid() const { return attrSid; } 99 /** 100 * Sets the sid attribute. 101 * @param atSid The new value for the sid attribute. 102 */ setSid(xsNCName atSid)103 void setSid( xsNCName atSid ) { *(daeStringRef*)&attrSid = atSid; _validAttributeArray[0] = true; } 104 105 protected: 106 /** 107 * Constructor 108 */ domTargetableFloat3(DAE & dae)109 domTargetableFloat3(DAE& dae) : daeElement(dae), domTargetableFloat3_complexType(dae, this) {} 110 /** 111 * Destructor 112 */ ~domTargetableFloat3()113 virtual ~domTargetableFloat3() {} 114 /** 115 * Overloaded assignment operator 116 */ 117 virtual domTargetableFloat3 &operator=( const domTargetableFloat3 &cpy ) { (void)cpy; return *this; } 118 119 public: // STATIC METHODS 120 /** 121 * Creates an instance of this class and returns a daeElementRef referencing it. 122 * @return a daeElementRef referencing an instance of this object. 123 */ 124 static DLLSPEC daeElementRef create(DAE& dae); 125 /** 126 * Creates a daeMetaElement object that describes this element in the meta object reflection framework. 127 * If a daeMetaElement already exists it will return that instead of creating a new one. 128 * @return A daeMetaElement describing this COLLADA element. 129 */ 130 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 131 }; 132 133 134 } // ColladaDOM141 135 #endif 136