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 __dom141Fx_surface_format_hint_common_h__ 10 #define __dom141Fx_surface_format_hint_common_h__ 11 12 #include <dae/daeDocument.h> 13 #include <1.4/dom/domTypes.h> 14 #include <1.4/dom/domElements.h> 15 16 #include <1.4/dom/domExtra.h> 17 18 class DAE; 19 namespace ColladaDOM141 { 20 21 /** 22 * If the exact format cannot be resolve via other methods then the format_hint 23 * will describe the important features of the format so that the application 24 * may select a compatable or close format 25 */ 26 class domFx_surface_format_hint_common_complexType 27 { 28 public: 29 class domChannels; 30 31 typedef daeSmartRef<domChannels> domChannelsRef; 32 typedef daeTArray<domChannelsRef> domChannels_Array; 33 34 /** 35 * The per-texel layout of the format. The length of the string indicate 36 * how many channels there are and the letter respresents the name of the 37 * channel. There are typically 0 to 4 channels. 38 */ 39 class domChannels : public daeElement 40 { 41 public: getElementType()42 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::CHANNELS; } ID()43 static daeInt ID() { return 6; } typeID()44 virtual daeInt typeID() const { return ID(); } 45 46 protected: // Value 47 /** 48 * The domFx_surface_format_hint_channels_enum value of the text data of this element. 49 */ 50 domFx_surface_format_hint_channels_enum _value; 51 52 public: //Accessors and Mutators 53 /** 54 * Gets the value of this element. 55 * @return a domFx_surface_format_hint_channels_enum of the value. 56 */ getValue()57 domFx_surface_format_hint_channels_enum getValue() const { return _value; } 58 /** 59 * Sets the _value of this element. 60 * @param val The new value for this element. 61 */ setValue(domFx_surface_format_hint_channels_enum val)62 void setValue( domFx_surface_format_hint_channels_enum val ) { _value = val; } 63 64 protected: 65 /** 66 * Constructor 67 */ domChannels(DAE & dae)68 domChannels(DAE& dae) : daeElement(dae), _value() {} 69 /** 70 * Destructor 71 */ ~domChannels()72 virtual ~domChannels() {} 73 /** 74 * Overloaded assignment operator 75 */ 76 virtual domChannels &operator=( const domChannels &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 domRange; 93 94 typedef daeSmartRef<domRange> domRangeRef; 95 typedef daeTArray<domRangeRef> domRange_Array; 96 97 /** 98 * Each channel represents a range of values. Some example ranges are signed 99 * or unsigned integers, or between between a clamped range such as 0.0f to 100 * 1.0f, or high dynamic range via floating point 101 */ 102 class domRange : public daeElement 103 { 104 public: getElementType()105 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::RANGE; } ID()106 static daeInt ID() { return 7; } typeID()107 virtual daeInt typeID() const { return ID(); } 108 109 protected: // Value 110 /** 111 * The domFx_surface_format_hint_range_enum value of the text data of this element. 112 */ 113 domFx_surface_format_hint_range_enum _value; 114 115 public: //Accessors and Mutators 116 /** 117 * Gets the value of this element. 118 * @return a domFx_surface_format_hint_range_enum of the value. 119 */ getValue()120 domFx_surface_format_hint_range_enum getValue() const { return _value; } 121 /** 122 * Sets the _value of this element. 123 * @param val The new value for this element. 124 */ setValue(domFx_surface_format_hint_range_enum val)125 void setValue( domFx_surface_format_hint_range_enum val ) { _value = val; } 126 127 protected: 128 /** 129 * Constructor 130 */ domRange(DAE & dae)131 domRange(DAE& dae) : daeElement(dae), _value() {} 132 /** 133 * Destructor 134 */ ~domRange()135 virtual ~domRange() {} 136 /** 137 * Overloaded assignment operator 138 */ 139 virtual domRange &operator=( const domRange &cpy ) { (void)cpy; return *this; } 140 141 public: // STATIC METHODS 142 /** 143 * Creates an instance of this class and returns a daeElementRef referencing it. 144 * @return a daeElementRef referencing an instance of this object. 145 */ 146 static DLLSPEC daeElementRef create(DAE& dae); 147 /** 148 * Creates a daeMetaElement object that describes this element in the meta object reflection framework. 149 * If a daeMetaElement already exists it will return that instead of creating a new one. 150 * @return A daeMetaElement describing this COLLADA element. 151 */ 152 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 153 }; 154 155 class domPrecision; 156 157 typedef daeSmartRef<domPrecision> domPrecisionRef; 158 typedef daeTArray<domPrecisionRef> domPrecision_Array; 159 160 /** 161 * Each channel of the texel has a precision. Typically these are all linked 162 * together. An exact format lay lower the precision of an individual channel 163 * but applying a higher precision by linking the channels together may still 164 * convey the same information. 165 */ 166 class domPrecision : public daeElement 167 { 168 public: getElementType()169 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::PRECISION; } ID()170 static daeInt ID() { return 8; } typeID()171 virtual daeInt typeID() const { return ID(); } 172 173 protected: // Value 174 /** 175 * The domFx_surface_format_hint_precision_enum value of the text data of this element. 176 */ 177 domFx_surface_format_hint_precision_enum _value; 178 179 public: //Accessors and Mutators 180 /** 181 * Gets the value of this element. 182 * @return a domFx_surface_format_hint_precision_enum of the value. 183 */ getValue()184 domFx_surface_format_hint_precision_enum getValue() const { return _value; } 185 /** 186 * Sets the _value of this element. 187 * @param val The new value for this element. 188 */ setValue(domFx_surface_format_hint_precision_enum val)189 void setValue( domFx_surface_format_hint_precision_enum val ) { _value = val; } 190 191 protected: 192 /** 193 * Constructor 194 */ domPrecision(DAE & dae)195 domPrecision(DAE& dae) : daeElement(dae), _value() {} 196 /** 197 * Destructor 198 */ ~domPrecision()199 virtual ~domPrecision() {} 200 /** 201 * Overloaded assignment operator 202 */ 203 virtual domPrecision &operator=( const domPrecision &cpy ) { (void)cpy; return *this; } 204 205 public: // STATIC METHODS 206 /** 207 * Creates an instance of this class and returns a daeElementRef referencing it. 208 * @return a daeElementRef referencing an instance of this object. 209 */ 210 static DLLSPEC daeElementRef create(DAE& dae); 211 /** 212 * Creates a daeMetaElement object that describes this element in the meta object reflection framework. 213 * If a daeMetaElement already exists it will return that instead of creating a new one. 214 * @return A daeMetaElement describing this COLLADA element. 215 */ 216 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 217 }; 218 219 class domOption; 220 221 typedef daeSmartRef<domOption> domOptionRef; 222 typedef daeTArray<domOptionRef> domOption_Array; 223 224 /** 225 * Additional hints about data relationships and other things to help the 226 * application pick the best format. 227 */ 228 class domOption : public daeElement 229 { 230 public: getElementType()231 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::OPTION; } ID()232 static daeInt ID() { return 9; } typeID()233 virtual daeInt typeID() const { return ID(); } 234 235 protected: // Value 236 /** 237 * The domFx_surface_format_hint_option_enum value of the text data of this element. 238 */ 239 domFx_surface_format_hint_option_enum _value; 240 241 public: //Accessors and Mutators 242 /** 243 * Gets the value of this element. 244 * @return a domFx_surface_format_hint_option_enum of the value. 245 */ getValue()246 domFx_surface_format_hint_option_enum getValue() const { return _value; } 247 /** 248 * Sets the _value of this element. 249 * @param val The new value for this element. 250 */ setValue(domFx_surface_format_hint_option_enum val)251 void setValue( domFx_surface_format_hint_option_enum val ) { _value = val; } 252 253 protected: 254 /** 255 * Constructor 256 */ domOption(DAE & dae)257 domOption(DAE& dae) : daeElement(dae), _value() {} 258 /** 259 * Destructor 260 */ ~domOption()261 virtual ~domOption() {} 262 /** 263 * Overloaded assignment operator 264 */ 265 virtual domOption &operator=( const domOption &cpy ) { (void)cpy; return *this; } 266 267 public: // STATIC METHODS 268 /** 269 * Creates an instance of this class and returns a daeElementRef referencing it. 270 * @return a daeElementRef referencing an instance of this object. 271 */ 272 static DLLSPEC daeElementRef create(DAE& dae); 273 /** 274 * Creates a daeMetaElement object that describes this element in the meta object reflection framework. 275 * If a daeMetaElement already exists it will return that instead of creating a new one. 276 * @return A daeMetaElement describing this COLLADA element. 277 */ 278 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 279 }; 280 281 282 283 protected: // Elements 284 /** 285 * The per-texel layout of the format. The length of the string indicate 286 * how many channels there are and the letter respresents the name of the 287 * channel. There are typically 0 to 4 channels. @see domChannels 288 */ 289 domChannelsRef elemChannels; 290 /** 291 * Each channel represents a range of values. Some example ranges are signed 292 * or unsigned integers, or between between a clamped range such as 0.0f to 293 * 1.0f, or high dynamic range via floating point @see domRange 294 */ 295 domRangeRef elemRange; 296 /** 297 * Each channel of the texel has a precision. Typically these are all linked 298 * together. An exact format lay lower the precision of an individual channel 299 * but applying a higher precision by linking the channels together may still 300 * convey the same information. @see domPrecision 301 */ 302 domPrecisionRef elemPrecision; 303 /** 304 * Additional hints about data relationships and other things to help the 305 * application pick the best format. @see domOption 306 */ 307 domOption_Array elemOption_array; 308 domExtra_Array elemExtra_array; 309 310 public: //Accessors and Mutators 311 /** 312 * Gets the channels element. 313 * @return a daeSmartRef to the channels element. 314 */ getChannels()315 const domChannelsRef getChannels() const { return elemChannels; } 316 /** 317 * Gets the range element. 318 * @return a daeSmartRef to the range element. 319 */ getRange()320 const domRangeRef getRange() const { return elemRange; } 321 /** 322 * Gets the precision element. 323 * @return a daeSmartRef to the precision element. 324 */ getPrecision()325 const domPrecisionRef getPrecision() const { return elemPrecision; } 326 /** 327 * Gets the option element array. 328 * @return Returns a reference to the array of option elements. 329 */ getOption_array()330 domOption_Array &getOption_array() { return elemOption_array; } 331 /** 332 * Gets the option element array. 333 * @return Returns a constant reference to the array of option elements. 334 */ getOption_array()335 const domOption_Array &getOption_array() const { return elemOption_array; } 336 /** 337 * Gets the extra element array. 338 * @return Returns a reference to the array of extra elements. 339 */ getExtra_array()340 domExtra_Array &getExtra_array() { return elemExtra_array; } 341 /** 342 * Gets the extra element array. 343 * @return Returns a constant reference to the array of extra elements. 344 */ getExtra_array()345 const domExtra_Array &getExtra_array() const { return elemExtra_array; } 346 protected: 347 /** 348 * Constructor 349 */ domFx_surface_format_hint_common_complexType(DAE & dae,daeElement * elt)350 domFx_surface_format_hint_common_complexType(DAE& dae, daeElement* elt) : elemChannels(), elemRange(), elemPrecision(), elemOption_array(), elemExtra_array() {} 351 /** 352 * Destructor 353 */ ~domFx_surface_format_hint_common_complexType()354 virtual ~domFx_surface_format_hint_common_complexType() {} 355 /** 356 * Overloaded assignment operator 357 */ 358 virtual domFx_surface_format_hint_common_complexType &operator=( const domFx_surface_format_hint_common_complexType &cpy ) { (void)cpy; return *this; } 359 }; 360 361 /** 362 * An element of type domFx_surface_format_hint_common_complexType. 363 */ 364 class domFx_surface_format_hint_common : public daeElement, public domFx_surface_format_hint_common_complexType 365 { 366 public: getElementType()367 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::FX_SURFACE_FORMAT_HINT_COMMON; } ID()368 static daeInt ID() { return 10; } typeID()369 virtual daeInt typeID() const { return ID(); } 370 protected: 371 /** 372 * Constructor 373 */ domFx_surface_format_hint_common(DAE & dae)374 domFx_surface_format_hint_common(DAE& dae) : daeElement(dae), domFx_surface_format_hint_common_complexType(dae, this) {} 375 /** 376 * Destructor 377 */ ~domFx_surface_format_hint_common()378 virtual ~domFx_surface_format_hint_common() {} 379 /** 380 * Overloaded assignment operator 381 */ 382 virtual domFx_surface_format_hint_common &operator=( const domFx_surface_format_hint_common &cpy ) { (void)cpy; return *this; } 383 384 public: // STATIC METHODS 385 /** 386 * Creates an instance of this class and returns a daeElementRef referencing it. 387 * @return a daeElementRef referencing an instance of this object. 388 */ 389 static DLLSPEC daeElementRef create(DAE& dae); 390 /** 391 * Creates a daeMetaElement object that describes this element in the meta object reflection framework. 392 * If a daeMetaElement already exists it will return that instead of creating a new one. 393 * @return A daeMetaElement describing this COLLADA element. 394 */ 395 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 396 }; 397 398 399 } // ColladaDOM141 400 #endif 401