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 __domTranslate_h__ 10 #define __domTranslate_h__ 11 12 #include <dae/daeDocument.h> 13 #include <dom/domTypes.h> 14 #include <dom/domElements.h> 15 16 #include <dom/domTargetableFloat3.h> 17 class DAE; 18 19 /** 20 * The translate element contains a mathematical vector that represents the 21 * distance along the X, Y and Z-axes. 22 */ 23 class domTranslate : public daeElement, public domTargetableFloat3_complexType 24 { 25 public: 26 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::TRANSLATE; } 27 static daeInt ID() { return 634; } 28 virtual daeInt typeID() const { return ID(); } 29 30 /** 31 * Gets the sid attribute. 32 * @return Returns a xsNCName of the sid attribute. 33 */ 34 xsNCName getSid() const { return attrSid; } 35 /** 36 * Sets the sid attribute. 37 * @param atSid The new value for the sid attribute. 38 */ 39 void setSid( xsNCName atSid ) { *(daeStringRef*)&attrSid = atSid; _validAttributeArray[0] = true; } 40 41 protected: 42 /** 43 * Constructor 44 */ 45 domTranslate(DAE& dae) : daeElement(dae), domTargetableFloat3_complexType(dae, this) {} 46 /** 47 * Destructor 48 */ 49 virtual ~domTranslate() {} 50 /** 51 * Overloaded assignment operator 52 */ 53 virtual domTranslate &operator=( const domTranslate &cpy ) { (void)cpy; return *this; } 54 55 public: // STATIC METHODS 56 /** 57 * Creates an instance of this class and returns a daeElementRef referencing it. 58 * @return a daeElementRef referencing an instance of this object. 59 */ 60 static DLLSPEC daeElementRef create(DAE& dae); 61 /** 62 * Creates a daeMetaElement object that describes this element in the meta object reflection framework. 63 * If a daeMetaElement already exists it will return that instead of creating a new one. 64 * @return A daeMetaElement describing this COLLADA element. 65 */ 66 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 67 }; 68 69 70 #endif 71