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