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 __domFx_surface_init_cube_common_h__
     10 #define __domFx_surface_init_cube_common_h__
     11 
     12 #include <dae/daeDocument.h>
     13 #include <dom/domTypes.h>
     14 #include <dom/domElements.h>
     15 
     16 class DAE;
     17 
     18 class domFx_surface_init_cube_common_complexType
     19 {
     20 public:
     21 	class domAll;
     22 
     23 	typedef daeSmartRef<domAll> domAllRef;
     24 	typedef daeTArray<domAllRef> domAll_Array;
     25 
     26 /**
     27  * Init the entire surface with one compound image such as DDS
     28  */
     29 	class domAll : public daeElement
     30 	{
     31 	public:
     32 		virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::ALL; }
     33 		static daeInt ID() { return 16; }
     34 		virtual daeInt typeID() const { return ID(); }
     35 	protected:  // Attribute
     36 		xsIDREF attrRef;
     37 
     38 
     39 	public:	//Accessors and Mutators
     40 		/**
     41 		 * Gets the ref attribute.
     42 		 * @return Returns a xsIDREF reference of the ref attribute.
     43 		 */
     44 		xsIDREF &getRef() { return attrRef; }
     45 		/**
     46 		 * Gets the ref attribute.
     47 		 * @return Returns a constant xsIDREF reference of the ref attribute.
     48 		 */
     49 		const xsIDREF &getRef() const{ return attrRef; }
     50 		/**
     51 		 * Sets the ref attribute.
     52 		 * @param atRef The new value for the ref attribute.
     53 		 */
     54 		void setRef( const xsIDREF &atRef ) { attrRef = atRef; _validAttributeArray[0] = true; }
     55 
     56 	protected:
     57 		/**
     58 		 * Constructor
     59 		 */
     60 		domAll(DAE& dae) : daeElement(dae), attrRef(*this) {}
     61 		/**
     62 		 * Destructor
     63 		 */
     64 		virtual ~domAll() {}
     65 		/**
     66 		 * Overloaded assignment operator
     67 		 */
     68 		virtual domAll &operator=( const domAll &cpy ) { (void)cpy; return *this; }
     69 
     70 	public: // STATIC METHODS
     71 		/**
     72 		 * Creates an instance of this class and returns a daeElementRef referencing it.
     73 		 * @return a daeElementRef referencing an instance of this object.
     74 		 */
     75 		static DLLSPEC daeElementRef create(DAE& dae);
     76 		/**
     77 		 * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
     78 		 * If a daeMetaElement already exists it will return that instead of creating a new one.
     79 		 * @return A daeMetaElement describing this COLLADA element.
     80 		 */
     81 		static DLLSPEC daeMetaElement* registerElement(DAE& dae);
     82 	};
     83 
     84 	class domPrimary;
     85 
     86 	typedef daeSmartRef<domPrimary> domPrimaryRef;
     87 	typedef daeTArray<domPrimaryRef> domPrimary_Array;
     88 
     89 /**
     90  * Init all primary mip level 0 subsurfaces with one compound image such as
     91  * DDS.  Use of this element expects that the surface has element mip_levels=0
     92  * or mipmap_generate.
     93  */
     94 	class domPrimary : public daeElement
     95 	{
     96 	public:
     97 		virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::PRIMARY; }
     98 		static daeInt ID() { return 17; }
     99 		virtual daeInt typeID() const { return ID(); }
    100 	public:
    101 		class domOrder;
    102 
    103 		typedef daeSmartRef<domOrder> domOrderRef;
    104 		typedef daeTArray<domOrderRef> domOrder_Array;
    105 
    106 /**
    107  * If the image dues not natively describe the face ordering then this series
    108  * of order elements will describe which face the index belongs too
    109  */
    110 		class domOrder : public daeElement
    111 		{
    112 		public:
    113 			virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::ORDER; }
    114 			static daeInt ID() { return 18; }
    115 			virtual daeInt typeID() const { return ID(); }
    116 
    117 		protected:  // Value
    118 			/**
    119 			 * The domFx_surface_face_enum value of the text data of this element.
    120 			 */
    121 			domFx_surface_face_enum _value;
    122 
    123 		public:	//Accessors and Mutators
    124 			/**
    125 			 * Gets the value of this element.
    126 			 * @return a domFx_surface_face_enum of the value.
    127 			 */
    128 			domFx_surface_face_enum getValue() const { return _value; }
    129 			/**
    130 			 * Sets the _value of this element.
    131 			 * @param val The new value for this element.
    132 			 */
    133 			void setValue( domFx_surface_face_enum val ) { _value = val; }
    134 
    135 		protected:
    136 			/**
    137 			 * Constructor
    138 			 */
    139 			domOrder(DAE& dae) : daeElement(dae), _value() {}
    140 			/**
    141 			 * Destructor
    142 			 */
    143 			virtual ~domOrder() {}
    144 			/**
    145 			 * Overloaded assignment operator
    146 			 */
    147 			virtual domOrder &operator=( const domOrder &cpy ) { (void)cpy; return *this; }
    148 
    149 		public: // STATIC METHODS
    150 			/**
    151 			 * Creates an instance of this class and returns a daeElementRef referencing it.
    152 			 * @return a daeElementRef referencing an instance of this object.
    153 			 */
    154 			static DLLSPEC daeElementRef create(DAE& dae);
    155 			/**
    156 			 * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
    157 			 * If a daeMetaElement already exists it will return that instead of creating a new one.
    158 			 * @return A daeMetaElement describing this COLLADA element.
    159 			 */
    160 			static DLLSPEC daeMetaElement* registerElement(DAE& dae);
    161 		};
    162 
    163 
    164 	protected:  // Attribute
    165 		xsIDREF attrRef;
    166 
    167 	protected:  // Element
    168 /**
    169  * If the image dues not natively describe the face ordering then this series
    170  * of order elements will describe which face the index belongs too @see domOrder
    171  */
    172 		domOrder_Array elemOrder_array;
    173 
    174 	public:	//Accessors and Mutators
    175 		/**
    176 		 * Gets the ref attribute.
    177 		 * @return Returns a xsIDREF reference of the ref attribute.
    178 		 */
    179 		xsIDREF &getRef() { return attrRef; }
    180 		/**
    181 		 * Gets the ref attribute.
    182 		 * @return Returns a constant xsIDREF reference of the ref attribute.
    183 		 */
    184 		const xsIDREF &getRef() const{ return attrRef; }
    185 		/**
    186 		 * Sets the ref attribute.
    187 		 * @param atRef The new value for the ref attribute.
    188 		 */
    189 		void setRef( const xsIDREF &atRef ) { attrRef = atRef; _validAttributeArray[0] = true; }
    190 
    191 		/**
    192 		 * Gets the order element array.
    193 		 * @return Returns a reference to the array of order elements.
    194 		 */
    195 		domOrder_Array &getOrder_array() { return elemOrder_array; }
    196 		/**
    197 		 * Gets the order element array.
    198 		 * @return Returns a constant reference to the array of order elements.
    199 		 */
    200 		const domOrder_Array &getOrder_array() const { return elemOrder_array; }
    201 	protected:
    202 		/**
    203 		 * Constructor
    204 		 */
    205 		domPrimary(DAE& dae) : daeElement(dae), attrRef(*this), elemOrder_array() {}
    206 		/**
    207 		 * Destructor
    208 		 */
    209 		virtual ~domPrimary() {}
    210 		/**
    211 		 * Overloaded assignment operator
    212 		 */
    213 		virtual domPrimary &operator=( const domPrimary &cpy ) { (void)cpy; return *this; }
    214 
    215 	public: // STATIC METHODS
    216 		/**
    217 		 * Creates an instance of this class and returns a daeElementRef referencing it.
    218 		 * @return a daeElementRef referencing an instance of this object.
    219 		 */
    220 		static DLLSPEC daeElementRef create(DAE& dae);
    221 		/**
    222 		 * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
    223 		 * If a daeMetaElement already exists it will return that instead of creating a new one.
    224 		 * @return A daeMetaElement describing this COLLADA element.
    225 		 */
    226 		static DLLSPEC daeMetaElement* registerElement(DAE& dae);
    227 	};
    228 
    229 	class domFace;
    230 
    231 	typedef daeSmartRef<domFace> domFaceRef;
    232 	typedef daeTArray<domFaceRef> domFace_Array;
    233 
    234 /**
    235  * Init each face mipchain with one compound image such as DDS
    236  */
    237 	class domFace : public daeElement
    238 	{
    239 	public:
    240 		virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::FACE; }
    241 		static daeInt ID() { return 19; }
    242 		virtual daeInt typeID() const { return ID(); }
    243 	protected:  // Attribute
    244 		xsIDREF attrRef;
    245 
    246 
    247 	public:	//Accessors and Mutators
    248 		/**
    249 		 * Gets the ref attribute.
    250 		 * @return Returns a xsIDREF reference of the ref attribute.
    251 		 */
    252 		xsIDREF &getRef() { return attrRef; }
    253 		/**
    254 		 * Gets the ref attribute.
    255 		 * @return Returns a constant xsIDREF reference of the ref attribute.
    256 		 */
    257 		const xsIDREF &getRef() const{ return attrRef; }
    258 		/**
    259 		 * Sets the ref attribute.
    260 		 * @param atRef The new value for the ref attribute.
    261 		 */
    262 		void setRef( const xsIDREF &atRef ) { attrRef = atRef; _validAttributeArray[0] = true; }
    263 
    264 	protected:
    265 		/**
    266 		 * Constructor
    267 		 */
    268 		domFace(DAE& dae) : daeElement(dae), attrRef(*this) {}
    269 		/**
    270 		 * Destructor
    271 		 */
    272 		virtual ~domFace() {}
    273 		/**
    274 		 * Overloaded assignment operator
    275 		 */
    276 		virtual domFace &operator=( const domFace &cpy ) { (void)cpy; return *this; }
    277 
    278 	public: // STATIC METHODS
    279 		/**
    280 		 * Creates an instance of this class and returns a daeElementRef referencing it.
    281 		 * @return a daeElementRef referencing an instance of this object.
    282 		 */
    283 		static DLLSPEC daeElementRef create(DAE& dae);
    284 		/**
    285 		 * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
    286 		 * If a daeMetaElement already exists it will return that instead of creating a new one.
    287 		 * @return A daeMetaElement describing this COLLADA element.
    288 		 */
    289 		static DLLSPEC daeMetaElement* registerElement(DAE& dae);
    290 	};
    291 
    292 
    293 
    294 protected:  // Elements
    295 /**
    296  * Init the entire surface with one compound image such as DDS @see domAll
    297  */
    298 	domAllRef elemAll;
    299 /**
    300  * Init all primary mip level 0 subsurfaces with one compound image such as
    301  * DDS.  Use of this element expects that the surface has element mip_levels=0
    302  * or mipmap_generate. @see domPrimary
    303  */
    304 	domPrimaryRef elemPrimary;
    305 /**
    306  * Init each face mipchain with one compound image such as DDS @see domFace
    307  */
    308 	domFace_Array elemFace_array;
    309 	/**
    310 	 * Used to preserve order in elements that do not specify strict sequencing of sub-elements.
    311 	 */
    312 	daeElementRefArray _contents;
    313 	/**
    314 	 * Used to preserve order in elements that have a complex content model.
    315 	 */
    316 	daeUIntArray       _contentsOrder;
    317 
    318 	/**
    319 	 * Used to store information needed for some content model objects.
    320 	 */
    321 	daeTArray< daeCharArray * > _CMData;
    322 
    323 
    324 public:	//Accessors and Mutators
    325 	/**
    326 	 * Gets the all element.
    327 	 * @return a daeSmartRef to the all element.
    328 	 */
    329 	const domAllRef getAll() const { return elemAll; }
    330 	/**
    331 	 * Gets the primary element.
    332 	 * @return a daeSmartRef to the primary element.
    333 	 */
    334 	const domPrimaryRef getPrimary() const { return elemPrimary; }
    335 	/**
    336 	 * Gets the face element array.
    337 	 * @return Returns a reference to the array of face elements.
    338 	 */
    339 	domFace_Array &getFace_array() { return elemFace_array; }
    340 	/**
    341 	 * Gets the face element array.
    342 	 * @return Returns a constant reference to the array of face elements.
    343 	 */
    344 	const domFace_Array &getFace_array() const { return elemFace_array; }
    345 	/**
    346 	 * Gets the _contents array.
    347 	 * @return Returns a reference to the _contents element array.
    348 	 */
    349 	daeElementRefArray &getContents() { return _contents; }
    350 	/**
    351 	 * Gets the _contents array.
    352 	 * @return Returns a constant reference to the _contents element array.
    353 	 */
    354 	const daeElementRefArray &getContents() const { return _contents; }
    355 
    356 protected:
    357 	/**
    358 	 * Constructor
    359 	 */
    360 	domFx_surface_init_cube_common_complexType(DAE& dae, daeElement* elt) : elemAll(), elemPrimary(), elemFace_array() {}
    361 	/**
    362 	 * Destructor
    363 	 */
    364 	virtual ~domFx_surface_init_cube_common_complexType() { daeElement::deleteCMDataArray(_CMData); }
    365 	/**
    366 	 * Overloaded assignment operator
    367 	 */
    368 	virtual domFx_surface_init_cube_common_complexType &operator=( const domFx_surface_init_cube_common_complexType &cpy ) { (void)cpy; return *this; }
    369 };
    370 
    371 /**
    372  * An element of type domFx_surface_init_cube_common_complexType.
    373  */
    374 class domFx_surface_init_cube_common : public daeElement, public domFx_surface_init_cube_common_complexType
    375 {
    376 public:
    377 	virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::FX_SURFACE_INIT_CUBE_COMMON; }
    378 	static daeInt ID() { return 20; }
    379 	virtual daeInt typeID() const { return ID(); }
    380 protected:
    381 	/**
    382 	 * Constructor
    383 	 */
    384 	domFx_surface_init_cube_common(DAE& dae) : daeElement(dae), domFx_surface_init_cube_common_complexType(dae, this) {}
    385 	/**
    386 	 * Destructor
    387 	 */
    388 	virtual ~domFx_surface_init_cube_common() {}
    389 	/**
    390 	 * Overloaded assignment operator
    391 	 */
    392 	virtual domFx_surface_init_cube_common &operator=( const domFx_surface_init_cube_common &cpy ) { (void)cpy; return *this; }
    393 
    394 public: // STATIC METHODS
    395 	/**
    396 	 * Creates an instance of this class and returns a daeElementRef referencing it.
    397 	 * @return a daeElementRef referencing an instance of this object.
    398 	 */
    399 	static DLLSPEC daeElementRef create(DAE& dae);
    400 	/**
    401 	 * Creates a daeMetaElement object that describes this element in the meta object reflection framework.
    402 	 * If a daeMetaElement already exists it will return that instead of creating a new one.
    403 	 * @return A daeMetaElement describing this COLLADA element.
    404 	 */
    405 	static DLLSPEC daeMetaElement* registerElement(DAE& dae);
    406 };
    407 
    408 
    409 #endif
    410