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