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_volume_common_h__ 10#define __domFx_surface_init_volume_common_h__ 11 12#include <dae/daeDocument.h> 13#include <dom/domTypes.h> 14#include <dom/domElements.h> 15 16class DAE; 17 18class domFx_surface_init_volume_common_complexType 19{ 20public: 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 13; } 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 mip level 0 of the surface with one compound image such as DDS. Use 91 * of this element expects that the surface has element mip_levels=0 or mipmap_generate. 92 */ 93 class domPrimary : public daeElement 94 { 95 public: 96 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::PRIMARY; } 97 static daeInt ID() { return 14; } 98 virtual daeInt typeID() const { return ID(); } 99 protected: // Attribute 100 xsIDREF attrRef; 101 102 103 public: //Accessors and Mutators 104 /** 105 * Gets the ref attribute. 106 * @return Returns a xsIDREF reference of the ref attribute. 107 */ 108 xsIDREF &getRef() { return attrRef; } 109 /** 110 * Gets the ref attribute. 111 * @return Returns a constant xsIDREF reference of the ref attribute. 112 */ 113 const xsIDREF &getRef() const{ return attrRef; } 114 /** 115 * Sets the ref attribute. 116 * @param atRef The new value for the ref attribute. 117 */ 118 void setRef( const xsIDREF &atRef ) { attrRef = atRef; _validAttributeArray[0] = true; } 119 120 protected: 121 /** 122 * Constructor 123 */ 124 domPrimary(DAE& dae) : daeElement(dae), attrRef(*this) {} 125 /** 126 * Destructor 127 */ 128 virtual ~domPrimary() {} 129 /** 130 * Overloaded assignment operator 131 */ 132 virtual domPrimary &operator=( const domPrimary &cpy ) { (void)cpy; return *this; } 133 134 public: // STATIC METHODS 135 /** 136 * Creates an instance of this class and returns a daeElementRef referencing it. 137 * @return a daeElementRef referencing an instance of this object. 138 */ 139 static DLLSPEC daeElementRef create(DAE& dae); 140 /** 141 * Creates a daeMetaElement object that describes this element in the meta object reflection framework. 142 * If a daeMetaElement already exists it will return that instead of creating a new one. 143 * @return A daeMetaElement describing this COLLADA element. 144 */ 145 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 146 }; 147 148 149 150protected: // Elements 151/** 152 * Init the entire surface with one compound image such as DDS @see domAll 153 */ 154 domAllRef elemAll; 155/** 156 * Init mip level 0 of the surface with one compound image such as DDS. Use 157 * of this element expects that the surface has element mip_levels=0 or mipmap_generate. 158 * @see domPrimary 159 */ 160 domPrimaryRef elemPrimary; 161 /** 162 * Used to preserve order in elements that do not specify strict sequencing of sub-elements. 163 */ 164 daeElementRefArray _contents; 165 /** 166 * Used to preserve order in elements that have a complex content model. 167 */ 168 daeUIntArray _contentsOrder; 169 170 /** 171 * Used to store information needed for some content model objects. 172 */ 173 daeTArray< daeCharArray * > _CMData; 174 175 176public: //Accessors and Mutators 177 /** 178 * Gets the all element. 179 * @return a daeSmartRef to the all element. 180 */ 181 const domAllRef getAll() const { return elemAll; } 182 /** 183 * Gets the primary element. 184 * @return a daeSmartRef to the primary element. 185 */ 186 const domPrimaryRef getPrimary() const { return elemPrimary; } 187 /** 188 * Gets the _contents array. 189 * @return Returns a reference to the _contents element array. 190 */ 191 daeElementRefArray &getContents() { return _contents; } 192 /** 193 * Gets the _contents array. 194 * @return Returns a constant reference to the _contents element array. 195 */ 196 const daeElementRefArray &getContents() const { return _contents; } 197 198protected: 199 /** 200 * Constructor 201 */ 202 domFx_surface_init_volume_common_complexType(DAE& dae, daeElement* elt) : elemAll(), elemPrimary() {} 203 /** 204 * Destructor 205 */ 206 virtual ~domFx_surface_init_volume_common_complexType() { daeElement::deleteCMDataArray(_CMData); } 207 /** 208 * Overloaded assignment operator 209 */ 210 virtual domFx_surface_init_volume_common_complexType &operator=( const domFx_surface_init_volume_common_complexType &cpy ) { (void)cpy; return *this; } 211}; 212 213/** 214 * An element of type domFx_surface_init_volume_common_complexType. 215 */ 216class domFx_surface_init_volume_common : public daeElement, public domFx_surface_init_volume_common_complexType 217{ 218public: 219 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::FX_SURFACE_INIT_VOLUME_COMMON; } 220 static daeInt ID() { return 15; } 221 virtual daeInt typeID() const { return ID(); } 222protected: 223 /** 224 * Constructor 225 */ 226 domFx_surface_init_volume_common(DAE& dae) : daeElement(dae), domFx_surface_init_volume_common_complexType(dae, this) {} 227 /** 228 * Destructor 229 */ 230 virtual ~domFx_surface_init_volume_common() {} 231 /** 232 * Overloaded assignment operator 233 */ 234 virtual domFx_surface_init_volume_common &operator=( const domFx_surface_init_volume_common &cpy ) { (void)cpy; return *this; } 235 236public: // STATIC METHODS 237 /** 238 * Creates an instance of this class and returns a daeElementRef referencing it. 239 * @return a daeElementRef referencing an instance of this object. 240 */ 241 static DLLSPEC daeElementRef create(DAE& dae); 242 /** 243 * Creates a daeMetaElement object that describes this element in the meta object reflection framework. 244 * If a daeMetaElement already exists it will return that instead of creating a new one. 245 * @return A daeMetaElement describing this COLLADA element. 246 */ 247 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 248}; 249 250 251#endif 252