domRotate.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. /*
  2. * Copyright 2006 Sony Computer Entertainment Inc.
  3. *
  4. * Licensed under the SCEA Shared Source License, Version 1.0 (the "License"); you may not use this
  5. * file except in compliance with the License. You may obtain a copy of the License at:
  6. * http://research.scea.com/scea_shared_source_license.html
  7. *
  8. * Unless required by applicable law or agreed to in writing, software distributed under the License
  9. * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
  10. * implied. See the License for the specific language governing permissions and limitations under the
  11. * License.
  12. */
  13. #ifndef __domRotate_h__
  14. #define __domRotate_h__
  15. #include <dae/daeDocument.h>
  16. #include <dom/domTypes.h>
  17. #include <dom/domElements.h>
  18. class DAE;
  19. /**
  20. * The rotate element contains an angle and a mathematical vector that represents
  21. * the axis of rotation.
  22. */
  23. class domRotate : public daeElement
  24. {
  25. public:
  26. virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::ROTATE; }
  27. static daeInt ID() { return 631; }
  28. virtual daeInt typeID() const { return ID(); }
  29. protected: // Attribute
  30. /**
  31. * The sid attribute is a text string value containing the sub-identifier
  32. * of this element. This value must be unique within the scope of the parent
  33. * element. Optional attribute.
  34. */
  35. xsNCName attrSid;
  36. protected: // Value
  37. /**
  38. * The domFloat4 value of the text data of this element.
  39. */
  40. domFloat4 _value;
  41. public: //Accessors and Mutators
  42. /**
  43. * Gets the sid attribute.
  44. * @return Returns a xsNCName of the sid attribute.
  45. */
  46. xsNCName getSid() const { return attrSid; }
  47. /**
  48. * Sets the sid attribute.
  49. * @param atSid The new value for the sid attribute.
  50. */
  51. void setSid( xsNCName atSid ) { *(daeStringRef*)&attrSid = atSid; _validAttributeArray[0] = true; }
  52. /**
  53. * Gets the _value array.
  54. * @return Returns a domFloat4 reference of the _value array.
  55. */
  56. domFloat4 &getValue() { return _value; }
  57. /**
  58. * Gets the _value array.
  59. * @return Returns a constant domFloat4 reference of the _value array.
  60. */
  61. const domFloat4 &getValue() const { return _value; }
  62. /**
  63. * Sets the _value array.
  64. * @param val The new value for the _value array.
  65. */
  66. void setValue( const domFloat4 &val ) { _value = val; }
  67. protected:
  68. /**
  69. * Constructor
  70. */
  71. domRotate(DAE& dae) : daeElement(dae), attrSid(), _value() {}
  72. /**
  73. * Destructor
  74. */
  75. virtual ~domRotate() {}
  76. /**
  77. * Overloaded assignment operator
  78. */
  79. virtual domRotate &operator=( const domRotate &cpy ) { (void)cpy; return *this; }
  80. public: // STATIC METHODS
  81. /**
  82. * Creates an instance of this class and returns a daeElementRef referencing it.
  83. * @return a daeElementRef referencing an instance of this object.
  84. */
  85. static DLLSPEC daeElementRef create(DAE& dae);
  86. /**
  87. * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
  88. * If a daeMetaElement already exists it will return that instead of creating a new one.
  89. * @return A daeMetaElement describing this COLLADA element.
  90. */
  91. static DLLSPEC daeMetaElement* registerElement(DAE& dae);
  92. };
  93. #endif