domTargetableFloat3.h 4.0 KB

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