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_model_h__ 00010 #define __domPhysics_model_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/domRigid_body.h> 00018 #include <dom/domRigid_constraint.h> 00019 #include <dom/domInstance_physics_model.h> 00020 #include <dom/domExtra.h> 00021 class DAE; 00022 00027 class domPhysics_model : public daeElement 00028 { 00029 public: 00030 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::PHYSICS_MODEL; } 00031 static daeInt ID() { return 813; } 00032 virtual daeInt typeID() const { return ID(); } 00033 protected: // Attributes 00039 xsID attrId; 00043 xsNCName attrName; 00044 00045 protected: // Elements 00049 domAssetRef elemAsset; 00054 domRigid_body_Array elemRigid_body_array; 00059 domRigid_constraint_Array elemRigid_constraint_array; 00064 domInstance_physics_model_Array elemInstance_physics_model_array; 00068 domExtra_Array elemExtra_array; 00069 00070 public: //Accessors and Mutators 00075 xsID getId() const { return attrId; } 00080 void setId( xsID atId ) { *(daeStringRef*)&attrId = atId; _validAttributeArray[0] = true; 00081 if( _document != NULL ) _document->changeElementID( this, attrId ); 00082 } 00083 00088 xsNCName getName() const { return attrName; } 00093 void setName( xsNCName atName ) { *(daeStringRef*)&attrName = atName; _validAttributeArray[1] = true; } 00094 00099 const domAssetRef getAsset() const { return elemAsset; } 00104 domRigid_body_Array &getRigid_body_array() { return elemRigid_body_array; } 00109 const domRigid_body_Array &getRigid_body_array() const { return elemRigid_body_array; } 00114 domRigid_constraint_Array &getRigid_constraint_array() { return elemRigid_constraint_array; } 00119 const domRigid_constraint_Array &getRigid_constraint_array() const { return elemRigid_constraint_array; } 00124 domInstance_physics_model_Array &getInstance_physics_model_array() { return elemInstance_physics_model_array; } 00129 const domInstance_physics_model_Array &getInstance_physics_model_array() const { return elemInstance_physics_model_array; } 00134 domExtra_Array &getExtra_array() { return elemExtra_array; } 00139 const domExtra_Array &getExtra_array() const { return elemExtra_array; } 00140 protected: 00144 domPhysics_model(DAE& dae) : daeElement(dae), attrId(), attrName(), elemAsset(), elemRigid_body_array(), elemRigid_constraint_array(), elemInstance_physics_model_array(), elemExtra_array() {} 00148 virtual ~domPhysics_model() {} 00152 virtual domPhysics_model &operator=( const domPhysics_model &cpy ) { (void)cpy; return *this; } 00153 00154 public: // STATIC METHODS 00159 static DLLSPEC daeElementRef create(DAE& dae); 00165 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00166 }; 00167 00168 00169 #endif