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