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 __domPhysics_scene_h__ 00010 #define __domPhysics_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/domInstance_force_field.h> 00018 #include <dom/domInstance_physics_model.h> 00019 #include <dom/domTechnique.h> 00020 #include <dom/domExtra.h> 00021 #include <dom/domTargetableFloat3.h> 00022 #include <dom/domTargetableFloat.h> 00023 class DAE; 00024 00025 class domPhysics_scene : public daeElement 00026 { 00027 public: 00028 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::PHYSICS_SCENE; } 00029 static daeInt ID() { return 793; } 00030 virtual daeInt typeID() const { return ID(); } 00031 public: 00032 class domTechnique_common; 00033 00034 typedef daeSmartRef<domTechnique_common> domTechnique_commonRef; 00035 typedef daeTArray<domTechnique_commonRef> domTechnique_common_Array; 00036 00041 class domTechnique_common : public daeElement 00042 { 00043 public: 00044 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::TECHNIQUE_COMMON; } 00045 static daeInt ID() { return 794; } 00046 virtual daeInt typeID() const { return ID(); } 00047 00048 protected: // Elements 00052 domTargetableFloat3Ref elemGravity; 00056 domTargetableFloatRef elemTime_step; 00057 00058 public: //Accessors and Mutators 00063 const domTargetableFloat3Ref getGravity() const { return elemGravity; } 00068 const domTargetableFloatRef getTime_step() const { return elemTime_step; } 00069 protected: 00073 domTechnique_common(DAE& dae) : daeElement(dae), elemGravity(), elemTime_step() {} 00077 virtual ~domTechnique_common() {} 00081 virtual domTechnique_common &operator=( const domTechnique_common &cpy ) { (void)cpy; return *this; } 00082 00083 public: // STATIC METHODS 00088 static DLLSPEC daeElementRef create(DAE& dae); 00094 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00095 }; 00096 00097 00098 protected: // Attributes 00104 xsID attrId; 00108 xsNCName attrName; 00109 00110 protected: // Elements 00114 domAssetRef elemAsset; 00118 domInstance_force_field_Array elemInstance_force_field_array; 00122 domInstance_physics_model_Array elemInstance_physics_model_array; 00128 domTechnique_commonRef elemTechnique_common; 00133 domTechnique_Array elemTechnique_array; 00137 domExtra_Array elemExtra_array; 00138 00139 public: //Accessors and Mutators 00144 xsID getId() const { return attrId; } 00149 void setId( xsID atId ) { *(daeStringRef*)&attrId = atId; _validAttributeArray[0] = true; 00150 if( _document != NULL ) _document->changeElementID( this, attrId ); 00151 } 00152 00157 xsNCName getName() const { return attrName; } 00162 void setName( xsNCName atName ) { *(daeStringRef*)&attrName = atName; _validAttributeArray[1] = true; } 00163 00168 const domAssetRef getAsset() const { return elemAsset; } 00173 domInstance_force_field_Array &getInstance_force_field_array() { return elemInstance_force_field_array; } 00178 const domInstance_force_field_Array &getInstance_force_field_array() const { return elemInstance_force_field_array; } 00183 domInstance_physics_model_Array &getInstance_physics_model_array() { return elemInstance_physics_model_array; } 00188 const domInstance_physics_model_Array &getInstance_physics_model_array() const { return elemInstance_physics_model_array; } 00193 const domTechnique_commonRef getTechnique_common() const { return elemTechnique_common; } 00198 domTechnique_Array &getTechnique_array() { return elemTechnique_array; } 00203 const domTechnique_Array &getTechnique_array() const { return elemTechnique_array; } 00208 domExtra_Array &getExtra_array() { return elemExtra_array; } 00213 const domExtra_Array &getExtra_array() const { return elemExtra_array; } 00214 protected: 00218 domPhysics_scene(DAE& dae) : daeElement(dae), attrId(), attrName(), elemAsset(), elemInstance_force_field_array(), elemInstance_physics_model_array(), elemTechnique_common(), elemTechnique_array(), elemExtra_array() {} 00222 virtual ~domPhysics_scene() {} 00226 virtual domPhysics_scene &operator=( const domPhysics_scene &cpy ) { (void)cpy; return *this; } 00227 00228 public: // STATIC METHODS 00233 static DLLSPEC daeElementRef create(DAE& dae); 00239 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00240 }; 00241 00242 00243 #endif