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 __domVisual_scene_h__ 00010 #define __domVisual_scene_h__ 00011 00012 #include <dae/daeDocument.h> 00013 #include <dom/domTypes.h> 00014 #include <dom/domElements.h> 00015 00016 #include <dom/domAsset.h> 00017 #include <dom/domNode.h> 00018 #include <dom/domExtra.h> 00019 #include <dom/domInstance_effect.h> 00020 class DAE; 00021 00028 class domVisual_scene : public daeElement 00029 { 00030 public: 00031 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::VISUAL_SCENE; } 00032 static daeInt ID() { return 682; } 00033 virtual daeInt typeID() const { return ID(); } 00034 public: 00035 class domEvaluate_scene; 00036 00037 typedef daeSmartRef<domEvaluate_scene> domEvaluate_sceneRef; 00038 typedef daeTArray<domEvaluate_sceneRef> domEvaluate_scene_Array; 00039 00045 class domEvaluate_scene : public daeElement 00046 { 00047 public: 00048 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::EVALUATE_SCENE; } 00049 static daeInt ID() { return 683; } 00050 virtual daeInt typeID() const { return ID(); } 00051 public: 00052 class domRender; 00053 00054 typedef daeSmartRef<domRender> domRenderRef; 00055 typedef daeTArray<domRenderRef> domRender_Array; 00056 00061 class domRender : public daeElement 00062 { 00063 public: 00064 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::RENDER; } 00065 static daeInt ID() { return 684; } 00066 virtual daeInt typeID() const { return ID(); } 00067 public: 00068 class domLayer; 00069 00070 typedef daeSmartRef<domLayer> domLayerRef; 00071 typedef daeTArray<domLayerRef> domLayer_Array; 00072 00077 class domLayer : public daeElement 00078 { 00079 public: 00080 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::LAYER; } 00081 static daeInt ID() { return 685; } 00082 virtual daeInt typeID() const { return ID(); } 00083 00084 protected: // Value 00088 xsNCName _value; 00089 00090 public: //Accessors and Mutators 00095 xsNCName getValue() const { return _value; } 00100 void setValue( xsNCName val ) { *(daeStringRef*)&_value = val; } 00101 00102 protected: 00106 domLayer(DAE& dae) : daeElement(dae), _value() {} 00110 virtual ~domLayer() {} 00114 virtual domLayer &operator=( const domLayer &cpy ) { (void)cpy; return *this; } 00115 00116 public: // STATIC METHODS 00121 static DLLSPEC daeElementRef create(DAE& dae); 00127 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00128 }; 00129 00130 00131 protected: // Attribute 00136 xsAnyURI attrCamera_node; 00137 00138 protected: // Elements 00144 domLayer_Array elemLayer_array; 00149 domInstance_effectRef elemInstance_effect; 00150 00151 public: //Accessors and Mutators 00156 xsAnyURI &getCamera_node() { return attrCamera_node; } 00161 const xsAnyURI &getCamera_node() const { return attrCamera_node; } 00166 void setCamera_node( const xsAnyURI &atCamera_node ) { attrCamera_node = atCamera_node; _validAttributeArray[0] = true; } 00171 void setCamera_node( xsString atCamera_node ) { attrCamera_node = atCamera_node; _validAttributeArray[0] = true; } 00172 00177 domLayer_Array &getLayer_array() { return elemLayer_array; } 00182 const domLayer_Array &getLayer_array() const { return elemLayer_array; } 00187 const domInstance_effectRef getInstance_effect() const { return elemInstance_effect; } 00188 protected: 00192 domRender(DAE& dae) : daeElement(dae), attrCamera_node(dae, *this), elemLayer_array(), elemInstance_effect() {} 00196 virtual ~domRender() {} 00200 virtual domRender &operator=( const domRender &cpy ) { (void)cpy; return *this; } 00201 00202 public: // STATIC METHODS 00207 static DLLSPEC daeElementRef create(DAE& dae); 00213 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00214 }; 00215 00216 00217 protected: // Attribute 00221 xsNCName attrName; 00222 00223 protected: // Element 00228 domRender_Array elemRender_array; 00229 00230 public: //Accessors and Mutators 00235 xsNCName getName() const { return attrName; } 00240 void setName( xsNCName atName ) { *(daeStringRef*)&attrName = atName; _validAttributeArray[0] = true; } 00241 00246 domRender_Array &getRender_array() { return elemRender_array; } 00251 const domRender_Array &getRender_array() const { return elemRender_array; } 00252 protected: 00256 domEvaluate_scene(DAE& dae) : daeElement(dae), attrName(), elemRender_array() {} 00260 virtual ~domEvaluate_scene() {} 00264 virtual domEvaluate_scene &operator=( const domEvaluate_scene &cpy ) { (void)cpy; return *this; } 00265 00266 public: // STATIC METHODS 00271 static DLLSPEC daeElementRef create(DAE& dae); 00277 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00278 }; 00279 00280 00281 protected: // Attributes 00287 xsID attrId; 00291 xsNCName attrName; 00292 00293 protected: // Elements 00297 domAssetRef elemAsset; 00301 domNode_Array elemNode_array; 00307 domEvaluate_scene_Array elemEvaluate_scene_array; 00311 domExtra_Array elemExtra_array; 00312 00313 public: //Accessors and Mutators 00318 xsID getId() const { return attrId; } 00323 void setId( xsID atId ) { *(daeStringRef*)&attrId = atId; _validAttributeArray[0] = true; 00324 if( _document != NULL ) _document->changeElementID( this, attrId ); 00325 } 00326 00331 xsNCName getName() const { return attrName; } 00336 void setName( xsNCName atName ) { *(daeStringRef*)&attrName = atName; _validAttributeArray[1] = true; } 00337 00342 const domAssetRef getAsset() const { return elemAsset; } 00347 domNode_Array &getNode_array() { return elemNode_array; } 00352 const domNode_Array &getNode_array() const { return elemNode_array; } 00357 domEvaluate_scene_Array &getEvaluate_scene_array() { return elemEvaluate_scene_array; } 00362 const domEvaluate_scene_Array &getEvaluate_scene_array() const { return elemEvaluate_scene_array; } 00367 domExtra_Array &getExtra_array() { return elemExtra_array; } 00372 const domExtra_Array &getExtra_array() const { return elemExtra_array; } 00373 protected: 00377 domVisual_scene(DAE& dae) : daeElement(dae), attrId(), attrName(), elemAsset(), elemNode_array(), elemEvaluate_scene_array(), elemExtra_array() {} 00381 virtual ~domVisual_scene() {} 00385 virtual domVisual_scene &operator=( const domVisual_scene &cpy ) { (void)cpy; return *this; } 00386 00387 public: // STATIC METHODS 00392 static DLLSPEC daeElementRef create(DAE& dae); 00398 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00399 }; 00400 00401 00402 #endif