domTapered_capsule.h 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311
  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 __domTapered_capsule_h__
  14. #define __domTapered_capsule_h__
  15. #include <dae/daeDocument.h>
  16. #include <dom/domTypes.h>
  17. #include <dom/domElements.h>
  18. #include <dom/domExtra.h>
  19. class DAE;
  20. /**
  21. * A tapered capsule primitive that is centered on, and aligned with, the
  22. * local Y axis.
  23. */
  24. class domTapered_capsule : public daeElement
  25. {
  26. public:
  27. virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::TAPERED_CAPSULE; }
  28. static daeInt ID() { return 785; }
  29. virtual daeInt typeID() const { return ID(); }
  30. public:
  31. class domHeight;
  32. typedef daeSmartRef<domHeight> domHeightRef;
  33. typedef daeTArray<domHeightRef> domHeight_Array;
  34. /**
  35. * A float value that represents the length of the line segment connecting
  36. * the centers of the capping hemispheres.
  37. */
  38. class domHeight : public daeElement
  39. {
  40. public:
  41. virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::HEIGHT; }
  42. static daeInt ID() { return 786; }
  43. virtual daeInt typeID() const { return ID(); }
  44. protected: // Value
  45. /**
  46. * The domFloat value of the text data of this element.
  47. */
  48. domFloat _value;
  49. public: //Accessors and Mutators
  50. /**
  51. * Gets the value of this element.
  52. * @return a domFloat of the value.
  53. */
  54. domFloat getValue() const { return _value; }
  55. /**
  56. * Sets the _value of this element.
  57. * @param val The new value for this element.
  58. */
  59. void setValue( domFloat val ) { _value = val; }
  60. protected:
  61. /**
  62. * Constructor
  63. */
  64. domHeight(DAE& dae) : daeElement(dae), _value() {}
  65. /**
  66. * Destructor
  67. */
  68. virtual ~domHeight() {}
  69. /**
  70. * Overloaded assignment operator
  71. */
  72. virtual domHeight &operator=( const domHeight &cpy ) { (void)cpy; return *this; }
  73. public: // STATIC METHODS
  74. /**
  75. * Creates an instance of this class and returns a daeElementRef referencing it.
  76. * @return a daeElementRef referencing an instance of this object.
  77. */
  78. static DLLSPEC daeElementRef create(DAE& dae);
  79. /**
  80. * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
  81. * If a daeMetaElement already exists it will return that instead of creating a new one.
  82. * @return A daeMetaElement describing this COLLADA element.
  83. */
  84. static DLLSPEC daeMetaElement* registerElement(DAE& dae);
  85. };
  86. class domRadius1;
  87. typedef daeSmartRef<domRadius1> domRadius1Ref;
  88. typedef daeTArray<domRadius1Ref> domRadius1_Array;
  89. /**
  90. * Two float values that represent the radii of the tapered capsule at the
  91. * positive (height/2) Y value.Both ends of the tapered capsule may be elliptical.
  92. */
  93. class domRadius1 : public daeElement
  94. {
  95. public:
  96. virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::RADIUS1; }
  97. static daeInt ID() { return 787; }
  98. virtual daeInt typeID() const { return ID(); }
  99. protected: // Value
  100. /**
  101. * The domFloat2 value of the text data of this element.
  102. */
  103. domFloat2 _value;
  104. public: //Accessors and Mutators
  105. /**
  106. * Gets the _value array.
  107. * @return Returns a domFloat2 reference of the _value array.
  108. */
  109. domFloat2 &getValue() { return _value; }
  110. /**
  111. * Gets the _value array.
  112. * @return Returns a constant domFloat2 reference of the _value array.
  113. */
  114. const domFloat2 &getValue() const { return _value; }
  115. /**
  116. * Sets the _value array.
  117. * @param val The new value for the _value array.
  118. */
  119. void setValue( const domFloat2 &val ) { _value = val; }
  120. protected:
  121. /**
  122. * Constructor
  123. */
  124. domRadius1(DAE& dae) : daeElement(dae), _value() {}
  125. /**
  126. * Destructor
  127. */
  128. virtual ~domRadius1() {}
  129. /**
  130. * Overloaded assignment operator
  131. */
  132. virtual domRadius1 &operator=( const domRadius1 &cpy ) { (void)cpy; return *this; }
  133. public: // STATIC METHODS
  134. /**
  135. * Creates an instance of this class and returns a daeElementRef referencing it.
  136. * @return a daeElementRef referencing an instance of this object.
  137. */
  138. static DLLSPEC daeElementRef create(DAE& dae);
  139. /**
  140. * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
  141. * If a daeMetaElement already exists it will return that instead of creating a new one.
  142. * @return A daeMetaElement describing this COLLADA element.
  143. */
  144. static DLLSPEC daeMetaElement* registerElement(DAE& dae);
  145. };
  146. class domRadius2;
  147. typedef daeSmartRef<domRadius2> domRadius2Ref;
  148. typedef daeTArray<domRadius2Ref> domRadius2_Array;
  149. /**
  150. * Two float values that represent the radii of the tapered capsule at the
  151. * negative (height/2) Y value.Both ends of the tapered capsule may be elliptical.
  152. */
  153. class domRadius2 : public daeElement
  154. {
  155. public:
  156. virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::RADIUS2; }
  157. static daeInt ID() { return 788; }
  158. virtual daeInt typeID() const { return ID(); }
  159. protected: // Value
  160. /**
  161. * The domFloat2 value of the text data of this element.
  162. */
  163. domFloat2 _value;
  164. public: //Accessors and Mutators
  165. /**
  166. * Gets the _value array.
  167. * @return Returns a domFloat2 reference of the _value array.
  168. */
  169. domFloat2 &getValue() { return _value; }
  170. /**
  171. * Gets the _value array.
  172. * @return Returns a constant domFloat2 reference of the _value array.
  173. */
  174. const domFloat2 &getValue() const { return _value; }
  175. /**
  176. * Sets the _value array.
  177. * @param val The new value for the _value array.
  178. */
  179. void setValue( const domFloat2 &val ) { _value = val; }
  180. protected:
  181. /**
  182. * Constructor
  183. */
  184. domRadius2(DAE& dae) : daeElement(dae), _value() {}
  185. /**
  186. * Destructor
  187. */
  188. virtual ~domRadius2() {}
  189. /**
  190. * Overloaded assignment operator
  191. */
  192. virtual domRadius2 &operator=( const domRadius2 &cpy ) { (void)cpy; return *this; }
  193. public: // STATIC METHODS
  194. /**
  195. * Creates an instance of this class and returns a daeElementRef referencing it.
  196. * @return a daeElementRef referencing an instance of this object.
  197. */
  198. static DLLSPEC daeElementRef create(DAE& dae);
  199. /**
  200. * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
  201. * If a daeMetaElement already exists it will return that instead of creating a new one.
  202. * @return A daeMetaElement describing this COLLADA element.
  203. */
  204. static DLLSPEC daeMetaElement* registerElement(DAE& dae);
  205. };
  206. protected: // Elements
  207. /**
  208. * A float value that represents the length of the line segment connecting
  209. * the centers of the capping hemispheres. @see domHeight
  210. */
  211. domHeightRef elemHeight;
  212. /**
  213. * Two float values that represent the radii of the tapered capsule at the
  214. * positive (height/2) Y value.Both ends of the tapered capsule may be elliptical.
  215. * @see domRadius1
  216. */
  217. domRadius1Ref elemRadius1;
  218. /**
  219. * Two float values that represent the radii of the tapered capsule at the
  220. * negative (height/2) Y value.Both ends of the tapered capsule may be elliptical.
  221. * @see domRadius2
  222. */
  223. domRadius2Ref elemRadius2;
  224. /**
  225. * The extra element may appear any number of times. @see domExtra
  226. */
  227. domExtra_Array elemExtra_array;
  228. public: //Accessors and Mutators
  229. /**
  230. * Gets the height element.
  231. * @return a daeSmartRef to the height element.
  232. */
  233. const domHeightRef getHeight() const { return elemHeight; }
  234. /**
  235. * Gets the radius1 element.
  236. * @return a daeSmartRef to the radius1 element.
  237. */
  238. const domRadius1Ref getRadius1() const { return elemRadius1; }
  239. /**
  240. * Gets the radius2 element.
  241. * @return a daeSmartRef to the radius2 element.
  242. */
  243. const domRadius2Ref getRadius2() const { return elemRadius2; }
  244. /**
  245. * Gets the extra element array.
  246. * @return Returns a reference to the array of extra elements.
  247. */
  248. domExtra_Array &getExtra_array() { return elemExtra_array; }
  249. /**
  250. * Gets the extra element array.
  251. * @return Returns a constant reference to the array of extra elements.
  252. */
  253. const domExtra_Array &getExtra_array() const { return elemExtra_array; }
  254. protected:
  255. /**
  256. * Constructor
  257. */
  258. domTapered_capsule(DAE& dae) : daeElement(dae), elemHeight(), elemRadius1(), elemRadius2(), elemExtra_array() {}
  259. /**
  260. * Destructor
  261. */
  262. virtual ~domTapered_capsule() {}
  263. /**
  264. * Overloaded assignment operator
  265. */
  266. virtual domTapered_capsule &operator=( const domTapered_capsule &cpy ) { (void)cpy; return *this; }
  267. public: // STATIC METHODS
  268. /**
  269. * Creates an instance of this class and returns a daeElementRef referencing it.
  270. * @return a daeElementRef referencing an instance of this object.
  271. */
  272. static DLLSPEC daeElementRef create(DAE& dae);
  273. /**
  274. * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
  275. * If a daeMetaElement already exists it will return that instead of creating a new one.
  276. * @return A daeMetaElement describing this COLLADA element.
  277. */
  278. static DLLSPEC daeMetaElement* registerElement(DAE& dae);
  279. };
  280. #endif