domEllipsoid.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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 __domEllipsoid_h__
  14. #define __domEllipsoid_h__
  15. #include <dae/daeDocument.h>
  16. #include <dom/domTypes.h>
  17. #include <dom/domElements.h>
  18. class DAE;
  19. class domEllipsoid : public daeElement
  20. {
  21. public:
  22. virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::ELLIPSOID; }
  23. static daeInt ID() { return 773; }
  24. virtual daeInt typeID() const { return ID(); }
  25. public:
  26. class domSize;
  27. typedef daeSmartRef<domSize> domSizeRef;
  28. typedef daeTArray<domSizeRef> domSize_Array;
  29. class domSize : public daeElement
  30. {
  31. public:
  32. virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::SIZE; }
  33. static daeInt ID() { return 774; }
  34. virtual daeInt typeID() const { return ID(); }
  35. protected: // Value
  36. /**
  37. * The domFloat3 value of the text data of this element.
  38. */
  39. domFloat3 _value;
  40. public: //Accessors and Mutators
  41. /**
  42. * Gets the _value array.
  43. * @return Returns a domFloat3 reference of the _value array.
  44. */
  45. domFloat3 &getValue() { return _value; }
  46. /**
  47. * Gets the _value array.
  48. * @return Returns a constant domFloat3 reference of the _value array.
  49. */
  50. const domFloat3 &getValue() const { return _value; }
  51. /**
  52. * Sets the _value array.
  53. * @param val The new value for the _value array.
  54. */
  55. void setValue( const domFloat3 &val ) { _value = val; }
  56. protected:
  57. /**
  58. * Constructor
  59. */
  60. domSize(DAE& dae) : daeElement(dae), _value() {}
  61. /**
  62. * Destructor
  63. */
  64. virtual ~domSize() {}
  65. /**
  66. * Overloaded assignment operator
  67. */
  68. virtual domSize &operator=( const domSize &cpy ) { (void)cpy; return *this; }
  69. public: // STATIC METHODS
  70. /**
  71. * Creates an instance of this class and returns a daeElementRef referencing it.
  72. * @return a daeElementRef referencing an instance of this object.
  73. */
  74. static DLLSPEC daeElementRef create(DAE& dae);
  75. /**
  76. * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
  77. * If a daeMetaElement already exists it will return that instead of creating a new one.
  78. * @return A daeMetaElement describing this COLLADA element.
  79. */
  80. static DLLSPEC daeMetaElement* registerElement(DAE& dae);
  81. };
  82. protected: // Element
  83. domSizeRef elemSize;
  84. public: //Accessors and Mutators
  85. /**
  86. * Gets the size element.
  87. * @return a daeSmartRef to the size element.
  88. */
  89. const domSizeRef getSize() const { return elemSize; }
  90. protected:
  91. /**
  92. * Constructor
  93. */
  94. domEllipsoid(DAE& dae) : daeElement(dae), elemSize() {}
  95. /**
  96. * Destructor
  97. */
  98. virtual ~domEllipsoid() {}
  99. /**
  100. * Overloaded assignment operator
  101. */
  102. virtual domEllipsoid &operator=( const domEllipsoid &cpy ) { (void)cpy; return *this; }
  103. public: // STATIC METHODS
  104. /**
  105. * Creates an instance of this class and returns a daeElementRef referencing it.
  106. * @return a daeElementRef referencing an instance of this object.
  107. */
  108. static DLLSPEC daeElementRef create(DAE& dae);
  109. /**
  110. * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
  111. * If a daeMetaElement already exists it will return that instead of creating a new one.
  112. * @return A daeMetaElement describing this COLLADA element.
  113. */
  114. static DLLSPEC daeMetaElement* registerElement(DAE& dae);
  115. };
  116. #endif