domRigid_constraint.h 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107
  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 __domRigid_constraint_h__
  14. #define __domRigid_constraint_h__
  15. #include <dae/daeDocument.h>
  16. #include <dom/domTypes.h>
  17. #include <dom/domElements.h>
  18. #include <dom/domTechnique.h>
  19. #include <dom/domExtra.h>
  20. #include <dom/domTranslate.h>
  21. #include <dom/domRotate.h>
  22. #include <dom/domTargetableFloat3.h>
  23. #include <dom/domTargetableFloat.h>
  24. class DAE;
  25. /**
  26. * This element allows for connecting components, such as rigid_body into
  27. * complex physics models with moveable parts.
  28. */
  29. class domRigid_constraint : public daeElement
  30. {
  31. public:
  32. virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::RIGID_CONSTRAINT; }
  33. static daeInt ID() { return 801; }
  34. virtual daeInt typeID() const { return ID(); }
  35. public:
  36. class domRef_attachment;
  37. typedef daeSmartRef<domRef_attachment> domRef_attachmentRef;
  38. typedef daeTArray<domRef_attachmentRef> domRef_attachment_Array;
  39. /**
  40. * Defines the attachment (to a rigid_body or a node) to be used as the reference-frame.
  41. */
  42. class domRef_attachment : public daeElement
  43. {
  44. public:
  45. virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::REF_ATTACHMENT; }
  46. static daeInt ID() { return 802; }
  47. virtual daeInt typeID() const { return ID(); }
  48. protected: // Attribute
  49. /**
  50. * The “rigid_body” attribute is a relative reference to a rigid-body
  51. * within the same physics_model.
  52. */
  53. xsAnyURI attrRigid_body;
  54. protected: // Elements
  55. /**
  56. * Allows you to "position" the attachment point. @see domTranslate
  57. */
  58. domTranslate_Array elemTranslate_array;
  59. /**
  60. * Allows you to "position" the attachment point. @see domRotate
  61. */
  62. domRotate_Array elemRotate_array;
  63. /**
  64. * The extra element may appear any number of times. @see domExtra
  65. */
  66. domExtra_Array elemExtra_array;
  67. /**
  68. * Used to preserve order in elements that do not specify strict sequencing of sub-elements.
  69. */
  70. daeElementRefArray _contents;
  71. /**
  72. * Used to preserve order in elements that have a complex content model.
  73. */
  74. daeUIntArray _contentsOrder;
  75. /**
  76. * Used to store information needed for some content model objects.
  77. */
  78. daeTArray< daeCharArray * > _CMData;
  79. public: //Accessors and Mutators
  80. /**
  81. * Gets the rigid_body attribute.
  82. * @return Returns a xsAnyURI reference of the rigid_body attribute.
  83. */
  84. xsAnyURI &getRigid_body() { return attrRigid_body; }
  85. /**
  86. * Gets the rigid_body attribute.
  87. * @return Returns a constant xsAnyURI reference of the rigid_body attribute.
  88. */
  89. const xsAnyURI &getRigid_body() const { return attrRigid_body; }
  90. /**
  91. * Sets the rigid_body attribute.
  92. * @param atRigid_body The new value for the rigid_body attribute.
  93. */
  94. void setRigid_body( const xsAnyURI &atRigid_body ) { attrRigid_body = atRigid_body; _validAttributeArray[0] = true; }
  95. /**
  96. * Sets the rigid_body attribute.
  97. * @param atRigid_body The new value for the rigid_body attribute.
  98. */
  99. void setRigid_body( xsString atRigid_body ) { attrRigid_body = atRigid_body; _validAttributeArray[0] = true; }
  100. /**
  101. * Gets the translate element array.
  102. * @return Returns a reference to the array of translate elements.
  103. */
  104. domTranslate_Array &getTranslate_array() { return elemTranslate_array; }
  105. /**
  106. * Gets the translate element array.
  107. * @return Returns a constant reference to the array of translate elements.
  108. */
  109. const domTranslate_Array &getTranslate_array() const { return elemTranslate_array; }
  110. /**
  111. * Gets the rotate element array.
  112. * @return Returns a reference to the array of rotate elements.
  113. */
  114. domRotate_Array &getRotate_array() { return elemRotate_array; }
  115. /**
  116. * Gets the rotate element array.
  117. * @return Returns a constant reference to the array of rotate elements.
  118. */
  119. const domRotate_Array &getRotate_array() const { return elemRotate_array; }
  120. /**
  121. * Gets the extra element array.
  122. * @return Returns a reference to the array of extra elements.
  123. */
  124. domExtra_Array &getExtra_array() { return elemExtra_array; }
  125. /**
  126. * Gets the extra element array.
  127. * @return Returns a constant reference to the array of extra elements.
  128. */
  129. const domExtra_Array &getExtra_array() const { return elemExtra_array; }
  130. /**
  131. * Gets the _contents array.
  132. * @return Returns a reference to the _contents element array.
  133. */
  134. daeElementRefArray &getContents() { return _contents; }
  135. /**
  136. * Gets the _contents array.
  137. * @return Returns a constant reference to the _contents element array.
  138. */
  139. const daeElementRefArray &getContents() const { return _contents; }
  140. protected:
  141. /**
  142. * Constructor
  143. */
  144. domRef_attachment(DAE& dae) : daeElement(dae), attrRigid_body(dae, *this), elemTranslate_array(), elemRotate_array(), elemExtra_array() {}
  145. /**
  146. * Destructor
  147. */
  148. virtual ~domRef_attachment() { daeElement::deleteCMDataArray(_CMData); }
  149. /**
  150. * Overloaded assignment operator
  151. */
  152. virtual domRef_attachment &operator=( const domRef_attachment &cpy ) { (void)cpy; return *this; }
  153. public: // STATIC METHODS
  154. /**
  155. * Creates an instance of this class and returns a daeElementRef referencing it.
  156. * @return a daeElementRef referencing an instance of this object.
  157. */
  158. static DLLSPEC daeElementRef create(DAE& dae);
  159. /**
  160. * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
  161. * If a daeMetaElement already exists it will return that instead of creating a new one.
  162. * @return A daeMetaElement describing this COLLADA element.
  163. */
  164. static DLLSPEC daeMetaElement* registerElement(DAE& dae);
  165. };
  166. class domAttachment;
  167. typedef daeSmartRef<domAttachment> domAttachmentRef;
  168. typedef daeTArray<domAttachmentRef> domAttachment_Array;
  169. /**
  170. * Defines an attachment to a rigid-body or a node.
  171. */
  172. class domAttachment : public daeElement
  173. {
  174. public:
  175. virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::ATTACHMENT; }
  176. static daeInt ID() { return 803; }
  177. virtual daeInt typeID() const { return ID(); }
  178. protected: // Attribute
  179. /**
  180. * The “rigid_body” attribute is a relative reference to a rigid-body
  181. * within the same physics_model.
  182. */
  183. xsAnyURI attrRigid_body;
  184. protected: // Elements
  185. /**
  186. * Allows you to "position" the attachment point. @see domTranslate
  187. */
  188. domTranslate_Array elemTranslate_array;
  189. /**
  190. * Allows you to "position" the attachment point. @see domRotate
  191. */
  192. domRotate_Array elemRotate_array;
  193. /**
  194. * The extra element may appear any number of times. @see domExtra
  195. */
  196. domExtra_Array elemExtra_array;
  197. /**
  198. * Used to preserve order in elements that do not specify strict sequencing of sub-elements.
  199. */
  200. daeElementRefArray _contents;
  201. /**
  202. * Used to preserve order in elements that have a complex content model.
  203. */
  204. daeUIntArray _contentsOrder;
  205. /**
  206. * Used to store information needed for some content model objects.
  207. */
  208. daeTArray< daeCharArray * > _CMData;
  209. public: //Accessors and Mutators
  210. /**
  211. * Gets the rigid_body attribute.
  212. * @return Returns a xsAnyURI reference of the rigid_body attribute.
  213. */
  214. xsAnyURI &getRigid_body() { return attrRigid_body; }
  215. /**
  216. * Gets the rigid_body attribute.
  217. * @return Returns a constant xsAnyURI reference of the rigid_body attribute.
  218. */
  219. const xsAnyURI &getRigid_body() const { return attrRigid_body; }
  220. /**
  221. * Sets the rigid_body attribute.
  222. * @param atRigid_body The new value for the rigid_body attribute.
  223. */
  224. void setRigid_body( const xsAnyURI &atRigid_body ) { attrRigid_body = atRigid_body; _validAttributeArray[0] = true; }
  225. /**
  226. * Sets the rigid_body attribute.
  227. * @param atRigid_body The new value for the rigid_body attribute.
  228. */
  229. void setRigid_body( xsString atRigid_body ) { attrRigid_body = atRigid_body; _validAttributeArray[0] = true; }
  230. /**
  231. * Gets the translate element array.
  232. * @return Returns a reference to the array of translate elements.
  233. */
  234. domTranslate_Array &getTranslate_array() { return elemTranslate_array; }
  235. /**
  236. * Gets the translate element array.
  237. * @return Returns a constant reference to the array of translate elements.
  238. */
  239. const domTranslate_Array &getTranslate_array() const { return elemTranslate_array; }
  240. /**
  241. * Gets the rotate element array.
  242. * @return Returns a reference to the array of rotate elements.
  243. */
  244. domRotate_Array &getRotate_array() { return elemRotate_array; }
  245. /**
  246. * Gets the rotate element array.
  247. * @return Returns a constant reference to the array of rotate elements.
  248. */
  249. const domRotate_Array &getRotate_array() const { return elemRotate_array; }
  250. /**
  251. * Gets the extra element array.
  252. * @return Returns a reference to the array of extra elements.
  253. */
  254. domExtra_Array &getExtra_array() { return elemExtra_array; }
  255. /**
  256. * Gets the extra element array.
  257. * @return Returns a constant reference to the array of extra elements.
  258. */
  259. const domExtra_Array &getExtra_array() const { return elemExtra_array; }
  260. /**
  261. * Gets the _contents array.
  262. * @return Returns a reference to the _contents element array.
  263. */
  264. daeElementRefArray &getContents() { return _contents; }
  265. /**
  266. * Gets the _contents array.
  267. * @return Returns a constant reference to the _contents element array.
  268. */
  269. const daeElementRefArray &getContents() const { return _contents; }
  270. protected:
  271. /**
  272. * Constructor
  273. */
  274. domAttachment(DAE& dae) : daeElement(dae), attrRigid_body(dae, *this), elemTranslate_array(), elemRotate_array(), elemExtra_array() {}
  275. /**
  276. * Destructor
  277. */
  278. virtual ~domAttachment() { daeElement::deleteCMDataArray(_CMData); }
  279. /**
  280. * Overloaded assignment operator
  281. */
  282. virtual domAttachment &operator=( const domAttachment &cpy ) { (void)cpy; return *this; }
  283. public: // STATIC METHODS
  284. /**
  285. * Creates an instance of this class and returns a daeElementRef referencing it.
  286. * @return a daeElementRef referencing an instance of this object.
  287. */
  288. static DLLSPEC daeElementRef create(DAE& dae);
  289. /**
  290. * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
  291. * If a daeMetaElement already exists it will return that instead of creating a new one.
  292. * @return A daeMetaElement describing this COLLADA element.
  293. */
  294. static DLLSPEC daeMetaElement* registerElement(DAE& dae);
  295. };
  296. class domTechnique_common;
  297. typedef daeSmartRef<domTechnique_common> domTechnique_commonRef;
  298. typedef daeTArray<domTechnique_commonRef> domTechnique_common_Array;
  299. /**
  300. * The technique_common element specifies the rigid_constraint information
  301. * for the common profile which all COLLADA implementations need to support.
  302. */
  303. class domTechnique_common : public daeElement
  304. {
  305. public:
  306. virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::TECHNIQUE_COMMON; }
  307. static daeInt ID() { return 804; }
  308. virtual daeInt typeID() const { return ID(); }
  309. public:
  310. class domEnabled;
  311. typedef daeSmartRef<domEnabled> domEnabledRef;
  312. typedef daeTArray<domEnabledRef> domEnabled_Array;
  313. /**
  314. * If false, the constraint doesn’t exert any force or influence on the
  315. * rigid bodies.
  316. */
  317. class domEnabled : public daeElement
  318. {
  319. public:
  320. virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::ENABLED; }
  321. static daeInt ID() { return 805; }
  322. virtual daeInt typeID() const { return ID(); }
  323. protected: // Attribute
  324. /**
  325. * The sid attribute is a text string value containing the sub-identifier
  326. * of this element. This value must be unique within the scope of the parent
  327. * element. Optional attribute.
  328. */
  329. xsNCName attrSid;
  330. protected: // Value
  331. /**
  332. * The domBool value of the text data of this element.
  333. */
  334. domBool _value;
  335. public: //Accessors and Mutators
  336. /**
  337. * Gets the sid attribute.
  338. * @return Returns a xsNCName of the sid attribute.
  339. */
  340. xsNCName getSid() const { return attrSid; }
  341. /**
  342. * Sets the sid attribute.
  343. * @param atSid The new value for the sid attribute.
  344. */
  345. void setSid( xsNCName atSid ) { *(daeStringRef*)&attrSid = atSid; _validAttributeArray[0] = true; }
  346. /**
  347. * Gets the value of this element.
  348. * @return a domBool of the value.
  349. */
  350. domBool getValue() const { return _value; }
  351. /**
  352. * Sets the _value of this element.
  353. * @param val The new value for this element.
  354. */
  355. void setValue( domBool val ) { _value = val; }
  356. protected:
  357. /**
  358. * Constructor
  359. */
  360. domEnabled(DAE& dae) : daeElement(dae), attrSid(), _value() {}
  361. /**
  362. * Destructor
  363. */
  364. virtual ~domEnabled() {}
  365. /**
  366. * Overloaded assignment operator
  367. */
  368. virtual domEnabled &operator=( const domEnabled &cpy ) { (void)cpy; return *this; }
  369. public: // STATIC METHODS
  370. /**
  371. * Creates an instance of this class and returns a daeElementRef referencing it.
  372. * @return a daeElementRef referencing an instance of this object.
  373. */
  374. static DLLSPEC daeElementRef create(DAE& dae);
  375. /**
  376. * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
  377. * If a daeMetaElement already exists it will return that instead of creating a new one.
  378. * @return A daeMetaElement describing this COLLADA element.
  379. */
  380. static DLLSPEC daeMetaElement* registerElement(DAE& dae);
  381. };
  382. class domInterpenetrate;
  383. typedef daeSmartRef<domInterpenetrate> domInterpenetrateRef;
  384. typedef daeTArray<domInterpenetrateRef> domInterpenetrate_Array;
  385. /**
  386. * Indicates whether the attached rigid bodies may inter-penetrate.
  387. */
  388. class domInterpenetrate : public daeElement
  389. {
  390. public:
  391. virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::INTERPENETRATE; }
  392. static daeInt ID() { return 806; }
  393. virtual daeInt typeID() const { return ID(); }
  394. protected: // Attribute
  395. /**
  396. * The sid attribute is a text string value containing the sub-identifier
  397. * of this element. This value must be unique within the scope of the parent
  398. * element. Optional attribute.
  399. */
  400. xsNCName attrSid;
  401. protected: // Value
  402. /**
  403. * The domBool value of the text data of this element.
  404. */
  405. domBool _value;
  406. public: //Accessors and Mutators
  407. /**
  408. * Gets the sid attribute.
  409. * @return Returns a xsNCName of the sid attribute.
  410. */
  411. xsNCName getSid() const { return attrSid; }
  412. /**
  413. * Sets the sid attribute.
  414. * @param atSid The new value for the sid attribute.
  415. */
  416. void setSid( xsNCName atSid ) { *(daeStringRef*)&attrSid = atSid; _validAttributeArray[0] = true; }
  417. /**
  418. * Gets the value of this element.
  419. * @return a domBool of the value.
  420. */
  421. domBool getValue() const { return _value; }
  422. /**
  423. * Sets the _value of this element.
  424. * @param val The new value for this element.
  425. */
  426. void setValue( domBool val ) { _value = val; }
  427. protected:
  428. /**
  429. * Constructor
  430. */
  431. domInterpenetrate(DAE& dae) : daeElement(dae), attrSid(), _value() {}
  432. /**
  433. * Destructor
  434. */
  435. virtual ~domInterpenetrate() {}
  436. /**
  437. * Overloaded assignment operator
  438. */
  439. virtual domInterpenetrate &operator=( const domInterpenetrate &cpy ) { (void)cpy; return *this; }
  440. public: // STATIC METHODS
  441. /**
  442. * Creates an instance of this class and returns a daeElementRef referencing it.
  443. * @return a daeElementRef referencing an instance of this object.
  444. */
  445. static DLLSPEC daeElementRef create(DAE& dae);
  446. /**
  447. * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
  448. * If a daeMetaElement already exists it will return that instead of creating a new one.
  449. * @return A daeMetaElement describing this COLLADA element.
  450. */
  451. static DLLSPEC daeMetaElement* registerElement(DAE& dae);
  452. };
  453. class domLimits;
  454. typedef daeSmartRef<domLimits> domLimitsRef;
  455. typedef daeTArray<domLimitsRef> domLimits_Array;
  456. /**
  457. * The limits element provides a flexible way to specify the constraint limits
  458. * (degrees of freedom and ranges).
  459. */
  460. class domLimits : public daeElement
  461. {
  462. public:
  463. virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::LIMITS; }
  464. static daeInt ID() { return 807; }
  465. virtual daeInt typeID() const { return ID(); }
  466. public:
  467. class domSwing_cone_and_twist;
  468. typedef daeSmartRef<domSwing_cone_and_twist> domSwing_cone_and_twistRef;
  469. typedef daeTArray<domSwing_cone_and_twistRef> domSwing_cone_and_twist_Array;
  470. /**
  471. * The swing_cone_and_twist element describes the angular limits along each
  472. * rotation axis in degrees. The the X and Y limits describe a “swing cone”
  473. * and the Z limits describe the “twist angle” range
  474. */
  475. class domSwing_cone_and_twist : public daeElement
  476. {
  477. public:
  478. virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::SWING_CONE_AND_TWIST; }
  479. static daeInt ID() { return 808; }
  480. virtual daeInt typeID() const { return ID(); }
  481. protected: // Elements
  482. /**
  483. * The minimum values for the limit. @see domMin
  484. */
  485. domTargetableFloat3Ref elemMin;
  486. /**
  487. * The maximum values for the limit. @see domMax
  488. */
  489. domTargetableFloat3Ref elemMax;
  490. public: //Accessors and Mutators
  491. /**
  492. * Gets the min element.
  493. * @return a daeSmartRef to the min element.
  494. */
  495. const domTargetableFloat3Ref getMin() const { return elemMin; }
  496. /**
  497. * Gets the max element.
  498. * @return a daeSmartRef to the max element.
  499. */
  500. const domTargetableFloat3Ref getMax() const { return elemMax; }
  501. protected:
  502. /**
  503. * Constructor
  504. */
  505. domSwing_cone_and_twist(DAE& dae) : daeElement(dae), elemMin(), elemMax() {}
  506. /**
  507. * Destructor
  508. */
  509. virtual ~domSwing_cone_and_twist() {}
  510. /**
  511. * Overloaded assignment operator
  512. */
  513. virtual domSwing_cone_and_twist &operator=( const domSwing_cone_and_twist &cpy ) { (void)cpy; return *this; }
  514. public: // STATIC METHODS
  515. /**
  516. * Creates an instance of this class and returns a daeElementRef referencing it.
  517. * @return a daeElementRef referencing an instance of this object.
  518. */
  519. static DLLSPEC daeElementRef create(DAE& dae);
  520. /**
  521. * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
  522. * If a daeMetaElement already exists it will return that instead of creating a new one.
  523. * @return A daeMetaElement describing this COLLADA element.
  524. */
  525. static DLLSPEC daeMetaElement* registerElement(DAE& dae);
  526. };
  527. class domLinear;
  528. typedef daeSmartRef<domLinear> domLinearRef;
  529. typedef daeTArray<domLinearRef> domLinear_Array;
  530. /**
  531. * The linear element describes linear (translational) limits along each axis.
  532. */
  533. class domLinear : public daeElement
  534. {
  535. public:
  536. virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::LINEAR; }
  537. static daeInt ID() { return 809; }
  538. virtual daeInt typeID() const { return ID(); }
  539. protected: // Elements
  540. /**
  541. * The minimum values for the limit. @see domMin
  542. */
  543. domTargetableFloat3Ref elemMin;
  544. /**
  545. * The maximum values for the limit. @see domMax
  546. */
  547. domTargetableFloat3Ref elemMax;
  548. public: //Accessors and Mutators
  549. /**
  550. * Gets the min element.
  551. * @return a daeSmartRef to the min element.
  552. */
  553. const domTargetableFloat3Ref getMin() const { return elemMin; }
  554. /**
  555. * Gets the max element.
  556. * @return a daeSmartRef to the max element.
  557. */
  558. const domTargetableFloat3Ref getMax() const { return elemMax; }
  559. protected:
  560. /**
  561. * Constructor
  562. */
  563. domLinear(DAE& dae) : daeElement(dae), elemMin(), elemMax() {}
  564. /**
  565. * Destructor
  566. */
  567. virtual ~domLinear() {}
  568. /**
  569. * Overloaded assignment operator
  570. */
  571. virtual domLinear &operator=( const domLinear &cpy ) { (void)cpy; return *this; }
  572. public: // STATIC METHODS
  573. /**
  574. * Creates an instance of this class and returns a daeElementRef referencing it.
  575. * @return a daeElementRef referencing an instance of this object.
  576. */
  577. static DLLSPEC daeElementRef create(DAE& dae);
  578. /**
  579. * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
  580. * If a daeMetaElement already exists it will return that instead of creating a new one.
  581. * @return A daeMetaElement describing this COLLADA element.
  582. */
  583. static DLLSPEC daeMetaElement* registerElement(DAE& dae);
  584. };
  585. protected: // Elements
  586. /**
  587. * The swing_cone_and_twist element describes the angular limits along each
  588. * rotation axis in degrees. The the X and Y limits describe a “swing cone”
  589. * and the Z limits describe the “twist angle” range @see domSwing_cone_and_twist
  590. */
  591. domSwing_cone_and_twistRef elemSwing_cone_and_twist;
  592. /**
  593. * The linear element describes linear (translational) limits along each axis.
  594. * @see domLinear
  595. */
  596. domLinearRef elemLinear;
  597. public: //Accessors and Mutators
  598. /**
  599. * Gets the swing_cone_and_twist element.
  600. * @return a daeSmartRef to the swing_cone_and_twist element.
  601. */
  602. const domSwing_cone_and_twistRef getSwing_cone_and_twist() const { return elemSwing_cone_and_twist; }
  603. /**
  604. * Gets the linear element.
  605. * @return a daeSmartRef to the linear element.
  606. */
  607. const domLinearRef getLinear() const { return elemLinear; }
  608. protected:
  609. /**
  610. * Constructor
  611. */
  612. domLimits(DAE& dae) : daeElement(dae), elemSwing_cone_and_twist(), elemLinear() {}
  613. /**
  614. * Destructor
  615. */
  616. virtual ~domLimits() {}
  617. /**
  618. * Overloaded assignment operator
  619. */
  620. virtual domLimits &operator=( const domLimits &cpy ) { (void)cpy; return *this; }
  621. public: // STATIC METHODS
  622. /**
  623. * Creates an instance of this class and returns a daeElementRef referencing it.
  624. * @return a daeElementRef referencing an instance of this object.
  625. */
  626. static DLLSPEC daeElementRef create(DAE& dae);
  627. /**
  628. * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
  629. * If a daeMetaElement already exists it will return that instead of creating a new one.
  630. * @return A daeMetaElement describing this COLLADA element.
  631. */
  632. static DLLSPEC daeMetaElement* registerElement(DAE& dae);
  633. };
  634. class domSpring;
  635. typedef daeSmartRef<domSpring> domSpringRef;
  636. typedef daeTArray<domSpringRef> domSpring_Array;
  637. /**
  638. * Spring, based on distance (“LINEAR”) or angle (“ANGULAR”).
  639. */
  640. class domSpring : public daeElement
  641. {
  642. public:
  643. virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::SPRING; }
  644. static daeInt ID() { return 810; }
  645. virtual daeInt typeID() const { return ID(); }
  646. public:
  647. class domAngular;
  648. typedef daeSmartRef<domAngular> domAngularRef;
  649. typedef daeTArray<domAngularRef> domAngular_Array;
  650. /**
  651. * The angular spring properties.
  652. */
  653. class domAngular : public daeElement
  654. {
  655. public:
  656. virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::ANGULAR; }
  657. static daeInt ID() { return 811; }
  658. virtual daeInt typeID() const { return ID(); }
  659. protected: // Elements
  660. /**
  661. * The stiffness (also called spring coefficient) has units of force/angle
  662. * in degrees. @see domStiffness
  663. */
  664. domTargetableFloatRef elemStiffness;
  665. /**
  666. * The spring damping coefficient. @see domDamping
  667. */
  668. domTargetableFloatRef elemDamping;
  669. /**
  670. * The spring's target or resting distance. @see domTarget_value
  671. */
  672. domTargetableFloatRef elemTarget_value;
  673. public: //Accessors and Mutators
  674. /**
  675. * Gets the stiffness element.
  676. * @return a daeSmartRef to the stiffness element.
  677. */
  678. const domTargetableFloatRef getStiffness() const { return elemStiffness; }
  679. /**
  680. * Gets the damping element.
  681. * @return a daeSmartRef to the damping element.
  682. */
  683. const domTargetableFloatRef getDamping() const { return elemDamping; }
  684. /**
  685. * Gets the target_value element.
  686. * @return a daeSmartRef to the target_value element.
  687. */
  688. const domTargetableFloatRef getTarget_value() const { return elemTarget_value; }
  689. protected:
  690. /**
  691. * Constructor
  692. */
  693. domAngular(DAE& dae) : daeElement(dae), elemStiffness(), elemDamping(), elemTarget_value() {}
  694. /**
  695. * Destructor
  696. */
  697. virtual ~domAngular() {}
  698. /**
  699. * Overloaded assignment operator
  700. */
  701. virtual domAngular &operator=( const domAngular &cpy ) { (void)cpy; return *this; }
  702. public: // STATIC METHODS
  703. /**
  704. * Creates an instance of this class and returns a daeElementRef referencing it.
  705. * @return a daeElementRef referencing an instance of this object.
  706. */
  707. static DLLSPEC daeElementRef create(DAE& dae);
  708. /**
  709. * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
  710. * If a daeMetaElement already exists it will return that instead of creating a new one.
  711. * @return A daeMetaElement describing this COLLADA element.
  712. */
  713. static DLLSPEC daeMetaElement* registerElement(DAE& dae);
  714. };
  715. class domLinear;
  716. typedef daeSmartRef<domLinear> domLinearRef;
  717. typedef daeTArray<domLinearRef> domLinear_Array;
  718. /**
  719. * The linear spring properties.
  720. */
  721. class domLinear : public daeElement
  722. {
  723. public:
  724. virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::LINEAR; }
  725. static daeInt ID() { return 812; }
  726. virtual daeInt typeID() const { return ID(); }
  727. protected: // Elements
  728. /**
  729. * The stiffness (also called spring coefficient) has units of force/distance.
  730. * @see domStiffness
  731. */
  732. domTargetableFloatRef elemStiffness;
  733. /**
  734. * The spring damping coefficient. @see domDamping
  735. */
  736. domTargetableFloatRef elemDamping;
  737. /**
  738. * The spring's target or resting distance. @see domTarget_value
  739. */
  740. domTargetableFloatRef elemTarget_value;
  741. public: //Accessors and Mutators
  742. /**
  743. * Gets the stiffness element.
  744. * @return a daeSmartRef to the stiffness element.
  745. */
  746. const domTargetableFloatRef getStiffness() const { return elemStiffness; }
  747. /**
  748. * Gets the damping element.
  749. * @return a daeSmartRef to the damping element.
  750. */
  751. const domTargetableFloatRef getDamping() const { return elemDamping; }
  752. /**
  753. * Gets the target_value element.
  754. * @return a daeSmartRef to the target_value element.
  755. */
  756. const domTargetableFloatRef getTarget_value() const { return elemTarget_value; }
  757. protected:
  758. /**
  759. * Constructor
  760. */
  761. domLinear(DAE& dae) : daeElement(dae), elemStiffness(), elemDamping(), elemTarget_value() {}
  762. /**
  763. * Destructor
  764. */
  765. virtual ~domLinear() {}
  766. /**
  767. * Overloaded assignment operator
  768. */
  769. virtual domLinear &operator=( const domLinear &cpy ) { (void)cpy; return *this; }
  770. public: // STATIC METHODS
  771. /**
  772. * Creates an instance of this class and returns a daeElementRef referencing it.
  773. * @return a daeElementRef referencing an instance of this object.
  774. */
  775. static DLLSPEC daeElementRef create(DAE& dae);
  776. /**
  777. * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
  778. * If a daeMetaElement already exists it will return that instead of creating a new one.
  779. * @return A daeMetaElement describing this COLLADA element.
  780. */
  781. static DLLSPEC daeMetaElement* registerElement(DAE& dae);
  782. };
  783. protected: // Elements
  784. /**
  785. * The angular spring properties. @see domAngular
  786. */
  787. domAngularRef elemAngular;
  788. /**
  789. * The linear spring properties. @see domLinear
  790. */
  791. domLinearRef elemLinear;
  792. public: //Accessors and Mutators
  793. /**
  794. * Gets the angular element.
  795. * @return a daeSmartRef to the angular element.
  796. */
  797. const domAngularRef getAngular() const { return elemAngular; }
  798. /**
  799. * Gets the linear element.
  800. * @return a daeSmartRef to the linear element.
  801. */
  802. const domLinearRef getLinear() const { return elemLinear; }
  803. protected:
  804. /**
  805. * Constructor
  806. */
  807. domSpring(DAE& dae) : daeElement(dae), elemAngular(), elemLinear() {}
  808. /**
  809. * Destructor
  810. */
  811. virtual ~domSpring() {}
  812. /**
  813. * Overloaded assignment operator
  814. */
  815. virtual domSpring &operator=( const domSpring &cpy ) { (void)cpy; return *this; }
  816. public: // STATIC METHODS
  817. /**
  818. * Creates an instance of this class and returns a daeElementRef referencing it.
  819. * @return a daeElementRef referencing an instance of this object.
  820. */
  821. static DLLSPEC daeElementRef create(DAE& dae);
  822. /**
  823. * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
  824. * If a daeMetaElement already exists it will return that instead of creating a new one.
  825. * @return A daeMetaElement describing this COLLADA element.
  826. */
  827. static DLLSPEC daeMetaElement* registerElement(DAE& dae);
  828. };
  829. protected: // Elements
  830. /**
  831. * If false, the constraint doesn’t exert any force or influence on the
  832. * rigid bodies. @see domEnabled
  833. */
  834. domEnabledRef elemEnabled;
  835. /**
  836. * Indicates whether the attached rigid bodies may inter-penetrate. @see domInterpenetrate
  837. */
  838. domInterpenetrateRef elemInterpenetrate;
  839. /**
  840. * The limits element provides a flexible way to specify the constraint limits
  841. * (degrees of freedom and ranges). @see domLimits
  842. */
  843. domLimitsRef elemLimits;
  844. /**
  845. * Spring, based on distance (“LINEAR”) or angle (“ANGULAR”). @see
  846. * domSpring
  847. */
  848. domSpringRef elemSpring;
  849. public: //Accessors and Mutators
  850. /**
  851. * Gets the enabled element.
  852. * @return a daeSmartRef to the enabled element.
  853. */
  854. const domEnabledRef getEnabled() const { return elemEnabled; }
  855. /**
  856. * Gets the interpenetrate element.
  857. * @return a daeSmartRef to the interpenetrate element.
  858. */
  859. const domInterpenetrateRef getInterpenetrate() const { return elemInterpenetrate; }
  860. /**
  861. * Gets the limits element.
  862. * @return a daeSmartRef to the limits element.
  863. */
  864. const domLimitsRef getLimits() const { return elemLimits; }
  865. /**
  866. * Gets the spring element.
  867. * @return a daeSmartRef to the spring element.
  868. */
  869. const domSpringRef getSpring() const { return elemSpring; }
  870. protected:
  871. /**
  872. * Constructor
  873. */
  874. domTechnique_common(DAE& dae) : daeElement(dae), elemEnabled(), elemInterpenetrate(), elemLimits(), elemSpring() {}
  875. /**
  876. * Destructor
  877. */
  878. virtual ~domTechnique_common() {}
  879. /**
  880. * Overloaded assignment operator
  881. */
  882. virtual domTechnique_common &operator=( const domTechnique_common &cpy ) { (void)cpy; return *this; }
  883. public: // STATIC METHODS
  884. /**
  885. * Creates an instance of this class and returns a daeElementRef referencing it.
  886. * @return a daeElementRef referencing an instance of this object.
  887. */
  888. static DLLSPEC daeElementRef create(DAE& dae);
  889. /**
  890. * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
  891. * If a daeMetaElement already exists it will return that instead of creating a new one.
  892. * @return A daeMetaElement describing this COLLADA element.
  893. */
  894. static DLLSPEC daeMetaElement* registerElement(DAE& dae);
  895. };
  896. protected: // Attributes
  897. /**
  898. * The sid attribute is a text string value containing the sub-identifier
  899. * of this element. This value must be unique within the scope of the parent
  900. * element. Optional attribute.
  901. */
  902. xsNCName attrSid;
  903. /**
  904. * The name attribute is the text string name of this element. Optional attribute.
  905. */
  906. xsNCName attrName;
  907. protected: // Elements
  908. /**
  909. * Defines the attachment (to a rigid_body or a node) to be used as the reference-frame.
  910. * @see domRef_attachment
  911. */
  912. domRef_attachmentRef elemRef_attachment;
  913. /**
  914. * Defines an attachment to a rigid-body or a node. @see domAttachment
  915. */
  916. domAttachmentRef elemAttachment;
  917. /**
  918. * The technique_common element specifies the rigid_constraint information
  919. * for the common profile which all COLLADA implementations need to support.
  920. * @see domTechnique_common
  921. */
  922. domTechnique_commonRef elemTechnique_common;
  923. /**
  924. * This element may contain any number of non-common profile techniques.
  925. * @see domTechnique
  926. */
  927. domTechnique_Array elemTechnique_array;
  928. /**
  929. * The extra element may appear any number of times. @see domExtra
  930. */
  931. domExtra_Array elemExtra_array;
  932. public: //Accessors and Mutators
  933. /**
  934. * Gets the sid attribute.
  935. * @return Returns a xsNCName of the sid attribute.
  936. */
  937. xsNCName getSid() const { return attrSid; }
  938. /**
  939. * Sets the sid attribute.
  940. * @param atSid The new value for the sid attribute.
  941. */
  942. void setSid( xsNCName atSid ) { *(daeStringRef*)&attrSid = atSid; _validAttributeArray[0] = true; }
  943. /**
  944. * Gets the name attribute.
  945. * @return Returns a xsNCName of the name attribute.
  946. */
  947. xsNCName getName() const { return attrName; }
  948. /**
  949. * Sets the name attribute.
  950. * @param atName The new value for the name attribute.
  951. */
  952. void setName( xsNCName atName ) { *(daeStringRef*)&attrName = atName; _validAttributeArray[1] = true; }
  953. /**
  954. * Gets the ref_attachment element.
  955. * @return a daeSmartRef to the ref_attachment element.
  956. */
  957. const domRef_attachmentRef getRef_attachment() const { return elemRef_attachment; }
  958. /**
  959. * Gets the attachment element.
  960. * @return a daeSmartRef to the attachment element.
  961. */
  962. const domAttachmentRef getAttachment() const { return elemAttachment; }
  963. /**
  964. * Gets the technique_common element.
  965. * @return a daeSmartRef to the technique_common element.
  966. */
  967. const domTechnique_commonRef getTechnique_common() const { return elemTechnique_common; }
  968. /**
  969. * Gets the technique element array.
  970. * @return Returns a reference to the array of technique elements.
  971. */
  972. domTechnique_Array &getTechnique_array() { return elemTechnique_array; }
  973. /**
  974. * Gets the technique element array.
  975. * @return Returns a constant reference to the array of technique elements.
  976. */
  977. const domTechnique_Array &getTechnique_array() const { return elemTechnique_array; }
  978. /**
  979. * Gets the extra element array.
  980. * @return Returns a reference to the array of extra elements.
  981. */
  982. domExtra_Array &getExtra_array() { return elemExtra_array; }
  983. /**
  984. * Gets the extra element array.
  985. * @return Returns a constant reference to the array of extra elements.
  986. */
  987. const domExtra_Array &getExtra_array() const { return elemExtra_array; }
  988. protected:
  989. /**
  990. * Constructor
  991. */
  992. domRigid_constraint(DAE& dae) : daeElement(dae), attrSid(), attrName(), elemRef_attachment(), elemAttachment(), elemTechnique_common(), elemTechnique_array(), elemExtra_array() {}
  993. /**
  994. * Destructor
  995. */
  996. virtual ~domRigid_constraint() {}
  997. /**
  998. * Overloaded assignment operator
  999. */
  1000. virtual domRigid_constraint &operator=( const domRigid_constraint &cpy ) { (void)cpy; return *this; }
  1001. public: // STATIC METHODS
  1002. /**
  1003. * Creates an instance of this class and returns a daeElementRef referencing it.
  1004. * @return a daeElementRef referencing an instance of this object.
  1005. */
  1006. static DLLSPEC daeElementRef create(DAE& dae);
  1007. /**
  1008. * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
  1009. * If a daeMetaElement already exists it will return that instead of creating a new one.
  1010. * @return A daeMetaElement describing this COLLADA element.
  1011. */
  1012. static DLLSPEC daeMetaElement* registerElement(DAE& dae);
  1013. };
  1014. #endif