• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 __domRotate_h__
10 #define __domRotate_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 rotate element contains an angle and a mathematical vector that represents
20  * the axis of rotation.
21  */
22 class domRotate : public daeElement
23 {
24 public:
getElementType()25 	virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::ROTATE; }
ID()26 	static daeInt ID() { return 631; }
typeID()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 domFloat4 value of the text data of this element.
39 	 */
40 	domFloat4 _value;
41 
42 public:	//Accessors and Mutators
43 	/**
44 	 * Gets the sid attribute.
45 	 * @return Returns a xsNCName of the sid attribute.
46 	 */
getSid()47 	xsNCName getSid() const { return attrSid; }
48 	/**
49 	 * Sets the sid attribute.
50 	 * @param atSid The new value for the sid attribute.
51 	 */
setSid(xsNCName atSid)52 	void setSid( xsNCName atSid ) { *(daeStringRef*)&attrSid = atSid; _validAttributeArray[0] = true; }
53 
54 	/**
55 	 * Gets the _value array.
56 	 * @return Returns a domFloat4 reference of the _value array.
57 	 */
getValue()58 	domFloat4 &getValue() { return _value; }
59 	/**
60 	 * Gets the _value array.
61 	 * @return Returns a constant domFloat4 reference of the _value array.
62 	 */
getValue()63 	const domFloat4 &getValue() const { return _value; }
64 	/**
65 	 * Sets the _value array.
66 	 * @param val The new value for the _value array.
67 	 */
setValue(const domFloat4 & val)68 	void setValue( const domFloat4 &val ) { _value = val; }
69 
70 protected:
71 	/**
72 	 * Constructor
73 	 */
domRotate(DAE & dae)74 	domRotate(DAE& dae) : daeElement(dae), attrSid(), _value() {}
75 	/**
76 	 * Destructor
77 	 */
~domRotate()78 	virtual ~domRotate() {}
79 	/**
80 	 * Overloaded assignment operator
81 	 */
82 	virtual domRotate &operator=( const domRotate &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