00001 /* 00002 * Copyright 2006 Sony Computer Entertainment Inc. 00003 * 00004 * Licensed under the MIT Open Source License, for details please see license.txt or the website 00005 * http://www.opensource.org/licenses/mit-license.php 00006 * 00007 */ 00008 00009 #ifndef __domFx_surface_common_h__ 00010 #define __domFx_surface_common_h__ 00011 00012 #include <dae/daeDocument.h> 00013 #include <dom/domTypes.h> 00014 #include <dom/domElements.h> 00015 00016 #include <dom/domFx_surface_init_common.h> 00017 #include <dom/domExtra.h> 00018 #include <dom/domFx_surface_format_hint_common.h> 00019 class DAE; 00020 00026 class domFx_surface_common_complexType 00027 { 00028 public: 00029 class domFormat; 00030 00031 typedef daeSmartRef<domFormat> domFormatRef; 00032 typedef daeTArray<domFormatRef> domFormat_Array; 00033 00040 class domFormat : public daeElement 00041 { 00042 public: 00043 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::FORMAT; } 00044 static daeInt ID() { return 22; } 00045 virtual daeInt typeID() const { return ID(); } 00046 00047 protected: // Value 00051 xsToken _value; 00052 00053 public: //Accessors and Mutators 00058 xsToken getValue() const { return _value; } 00063 void setValue( xsToken val ) { *(daeStringRef*)&_value = val; } 00064 00065 protected: 00069 domFormat(DAE& dae) : daeElement(dae), _value() {} 00073 virtual ~domFormat() {} 00077 virtual domFormat &operator=( const domFormat &cpy ) { (void)cpy; return *this; } 00078 00079 public: // STATIC METHODS 00084 static DLLSPEC daeElementRef create(DAE& dae); 00090 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00091 }; 00092 00093 class domSize; 00094 00095 typedef daeSmartRef<domSize> domSizeRef; 00096 typedef daeTArray<domSizeRef> domSize_Array; 00097 00101 class domSize : public daeElement 00102 { 00103 public: 00104 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::SIZE; } 00105 static daeInt ID() { return 23; } 00106 virtual daeInt typeID() const { return ID(); } 00107 00108 protected: // Value 00112 domInt3 _value; 00113 00114 public: //Accessors and Mutators 00119 domInt3 &getValue() { return _value; } 00124 const domInt3 &getValue() const { return _value; } 00129 void setValue( const domInt3 &val ) { _value = val; } 00130 00131 protected: 00135 domSize(DAE& dae) : daeElement(dae), _value() {} 00139 virtual ~domSize() {} 00143 virtual domSize &operator=( const domSize &cpy ) { (void)cpy; return *this; } 00144 00145 public: // STATIC METHODS 00150 static DLLSPEC daeElementRef create(DAE& dae); 00156 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00157 }; 00158 00159 class domViewport_ratio; 00160 00161 typedef daeSmartRef<domViewport_ratio> domViewport_ratioRef; 00162 typedef daeTArray<domViewport_ratioRef> domViewport_ratio_Array; 00163 00168 class domViewport_ratio : public daeElement 00169 { 00170 public: 00171 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::VIEWPORT_RATIO; } 00172 static daeInt ID() { return 24; } 00173 virtual daeInt typeID() const { return ID(); } 00174 00175 protected: // Value 00179 domFloat2 _value; 00180 00181 public: //Accessors and Mutators 00186 domFloat2 &getValue() { return _value; } 00191 const domFloat2 &getValue() const { return _value; } 00196 void setValue( const domFloat2 &val ) { _value = val; } 00197 00198 protected: 00202 domViewport_ratio(DAE& dae) : daeElement(dae), _value() {} 00206 virtual ~domViewport_ratio() {} 00210 virtual domViewport_ratio &operator=( const domViewport_ratio &cpy ) { (void)cpy; return *this; } 00211 00212 public: // STATIC METHODS 00217 static DLLSPEC daeElementRef create(DAE& dae); 00223 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00224 }; 00225 00226 class domMip_levels; 00227 00228 typedef daeSmartRef<domMip_levels> domMip_levelsRef; 00229 typedef daeTArray<domMip_levelsRef> domMip_levels_Array; 00230 00238 class domMip_levels : public daeElement 00239 { 00240 public: 00241 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::MIP_LEVELS; } 00242 static daeInt ID() { return 25; } 00243 virtual daeInt typeID() const { return ID(); } 00244 00245 protected: // Value 00249 xsUnsignedInt _value; 00250 00251 public: //Accessors and Mutators 00256 xsUnsignedInt getValue() const { return _value; } 00261 void setValue( xsUnsignedInt val ) { _value = val; } 00262 00263 protected: 00267 domMip_levels(DAE& dae) : daeElement(dae), _value() {} 00271 virtual ~domMip_levels() {} 00275 virtual domMip_levels &operator=( const domMip_levels &cpy ) { (void)cpy; return *this; } 00276 00277 public: // STATIC METHODS 00282 static DLLSPEC daeElementRef create(DAE& dae); 00288 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00289 }; 00290 00291 class domMipmap_generate; 00292 00293 typedef daeSmartRef<domMipmap_generate> domMipmap_generateRef; 00294 typedef daeTArray<domMipmap_generateRef> domMipmap_generate_Array; 00295 00302 class domMipmap_generate : public daeElement 00303 { 00304 public: 00305 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::MIPMAP_GENERATE; } 00306 static daeInt ID() { return 26; } 00307 virtual daeInt typeID() const { return ID(); } 00308 00309 protected: // Value 00313 xsBoolean _value; 00314 00315 public: //Accessors and Mutators 00320 xsBoolean getValue() const { return _value; } 00325 void setValue( xsBoolean val ) { _value = val; } 00326 00327 protected: 00331 domMipmap_generate(DAE& dae) : daeElement(dae), _value() {} 00335 virtual ~domMipmap_generate() {} 00339 virtual domMipmap_generate &operator=( const domMipmap_generate &cpy ) { (void)cpy; return *this; } 00340 00341 public: // STATIC METHODS 00346 static DLLSPEC daeElementRef create(DAE& dae); 00352 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00353 }; 00354 00355 00356 protected: // Attribute 00366 domFx_surface_type_enum attrType; 00367 00368 protected: // Elements 00375 domFx_surface_init_commonRef elemFx_surface_init_common; 00382 domFormatRef elemFormat; 00388 domFx_surface_format_hint_commonRef elemFormat_hint; 00392 domSizeRef elemSize; 00397 domViewport_ratioRef elemViewport_ratio; 00405 domMip_levelsRef elemMip_levels; 00412 domMipmap_generateRef elemMipmap_generate; 00413 domExtra_Array elemExtra_array; 00417 daeElementRefArray _contents; 00421 daeUIntArray _contentsOrder; 00422 00426 daeTArray< daeCharArray * > _CMData; 00427 00428 00429 public: //Accessors and Mutators 00434 domFx_surface_type_enum getType() const { return attrType; } 00439 void setType( domFx_surface_type_enum atType ) { attrType = atType; } 00440 00445 const domFx_surface_init_commonRef getFx_surface_init_common() const { return elemFx_surface_init_common; } 00450 const domFormatRef getFormat() const { return elemFormat; } 00455 const domFx_surface_format_hint_commonRef getFormat_hint() const { return elemFormat_hint; } 00460 const domSizeRef getSize() const { return elemSize; } 00465 const domViewport_ratioRef getViewport_ratio() const { return elemViewport_ratio; } 00470 const domMip_levelsRef getMip_levels() const { return elemMip_levels; } 00475 const domMipmap_generateRef getMipmap_generate() const { return elemMipmap_generate; } 00480 domExtra_Array &getExtra_array() { return elemExtra_array; } 00485 const domExtra_Array &getExtra_array() const { return elemExtra_array; } 00490 daeElementRefArray &getContents() { return _contents; } 00495 const daeElementRefArray &getContents() const { return _contents; } 00496 00497 protected: 00501 domFx_surface_common_complexType(DAE& dae, daeElement* elt) : attrType(), elemFx_surface_init_common(), elemFormat(), elemFormat_hint(), elemSize(), elemViewport_ratio(), elemMip_levels(), elemMipmap_generate(), elemExtra_array() {} 00505 virtual ~domFx_surface_common_complexType() { daeElement::deleteCMDataArray(_CMData); } 00509 virtual domFx_surface_common_complexType &operator=( const domFx_surface_common_complexType &cpy ) { (void)cpy; return *this; } 00510 }; 00511 00515 class domFx_surface_common : public daeElement, public domFx_surface_common_complexType 00516 { 00517 public: 00518 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::FX_SURFACE_COMMON; } 00519 static daeInt ID() { return 27; } 00520 virtual daeInt typeID() const { return ID(); } 00521 00522 public: //Accessors and Mutators 00527 domFx_surface_type_enum getType() const { return attrType; } 00532 void setType( domFx_surface_type_enum atType ) { attrType = atType; _validAttributeArray[0] = true; } 00533 00534 protected: 00538 domFx_surface_common(DAE& dae) : daeElement(dae), domFx_surface_common_complexType(dae, this) {} 00542 virtual ~domFx_surface_common() {} 00546 virtual domFx_surface_common &operator=( const domFx_surface_common &cpy ) { (void)cpy; return *this; } 00547 00548 public: // STATIC METHODS 00553 static DLLSPEC daeElementRef create(DAE& dae); 00559 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00560 }; 00561 00562 00563 #endif