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 __domSkew_h__ 10 #define __domSkew_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 skew element contains an angle and two mathematical vectors that represent 20 * the axis of rotation and the axis of translation. 21 */ 22 class domSkew : public daeElement 23 { 24 public: 25 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::SKEW; } 26 static daeInt ID() { return 633; } 27 virtual daeInt typeID() const { return ID(); } 28 protected: // Attribute 29 /** 30 * The sid attribute is a text string value containing the sub-identifier 31 * of this element. This value must be unique within the scope of the parent 32 * element. Optional attribute. 33 */ 34 xsNCName attrSid; 35 36 protected: // Value 37 /** 38 * The domFloat7 value of the text data of this element. 39 */ 40 domFloat7 _value; 41 42 public: //Accessors and Mutators 43 /** 44 * Gets the sid attribute. 45 * @return Returns a xsNCName of the sid attribute. 46 */ 47 xsNCName getSid() const { return attrSid; } 48 /** 49 * Sets the sid attribute. 50 * @param atSid The new value for the sid attribute. 51 */ 52 void setSid( xsNCName atSid ) { *(daeStringRef*)&attrSid = atSid; _validAttributeArray[0] = true; } 53 54 /** 55 * Gets the _value array. 56 * @return Returns a domFloat7 reference of the _value array. 57 */ 58 domFloat7 &getValue() { return _value; } 59 /** 60 * Gets the _value array. 61 * @return Returns a constant domFloat7 reference of the _value array. 62 */ 63 const domFloat7 &getValue() const { return _value; } 64 /** 65 * Sets the _value array. 66 * @param val The new value for the _value array. 67 */ 68 void setValue( const domFloat7 &val ) { _value = val; } 69 70 protected: 71 /** 72 * Constructor 73 */ 74 domSkew(DAE& dae) : daeElement(dae), attrSid(), _value() {} 75 /** 76 * Destructor 77 */ 78 virtual ~domSkew() {} 79 /** 80 * Overloaded assignment operator 81 */ 82 virtual domSkew &operator=( const domSkew &cpy ) { (void)cpy; return *this; } 83 84 public: // STATIC METHODS 85 /** 86 * Creates an instance of this class and returns a daeElementRef referencing it. 87 * @return a daeElementRef referencing an instance of this object. 88 */ 89 static DLLSPEC daeElementRef create(DAE& dae); 90 /** 91 * Creates a daeMetaElement object that describes this element in the meta object reflection framework. 92 * If a daeMetaElement already exists it will return that instead of creating a new one. 93 * @return A daeMetaElement describing this COLLADA element. 94 */ 95 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 96 }; 97 98 99 #endif 100