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_material_h__ 00010 #define __domPhysics_material_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/domTechnique.h> 00018 #include <dom/domExtra.h> 00019 #include <dom/domTargetableFloat.h> 00020 class DAE; 00021 00027 class domPhysics_material : public daeElement 00028 { 00029 public: 00030 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::PHYSICS_MATERIAL; } 00031 static daeInt ID() { return 791; } 00032 virtual daeInt typeID() const { return ID(); } 00033 public: 00034 class domTechnique_common; 00035 00036 typedef daeSmartRef<domTechnique_common> domTechnique_commonRef; 00037 typedef daeTArray<domTechnique_commonRef> domTechnique_common_Array; 00038 00043 class domTechnique_common : public daeElement 00044 { 00045 public: 00046 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::TECHNIQUE_COMMON; } 00047 static daeInt ID() { return 792; } 00048 virtual daeInt typeID() const { return ID(); } 00049 00050 protected: // Elements 00054 domTargetableFloatRef elemDynamic_friction; 00059 domTargetableFloatRef elemRestitution; 00063 domTargetableFloatRef elemStatic_friction; 00064 00065 public: //Accessors and Mutators 00070 const domTargetableFloatRef getDynamic_friction() const { return elemDynamic_friction; } 00075 const domTargetableFloatRef getRestitution() const { return elemRestitution; } 00080 const domTargetableFloatRef getStatic_friction() const { return elemStatic_friction; } 00081 protected: 00085 domTechnique_common(DAE& dae) : daeElement(dae), elemDynamic_friction(), elemRestitution(), elemStatic_friction() {} 00089 virtual ~domTechnique_common() {} 00093 virtual domTechnique_common &operator=( const domTechnique_common &cpy ) { (void)cpy; return *this; } 00094 00095 public: // STATIC METHODS 00100 static DLLSPEC daeElementRef create(DAE& dae); 00106 static DLLSPEC daeMetaElement* registerElement(DAE& dae); 00107 }; 00108 00109 00110 protected: // Attributes 00116 xsID attrId; 00120 xsNCName attrName; 00121 00122 protected: // Elements 00126 domAssetRef elemAsset; 00132 domTechnique_commonRef elemTechnique_common; 00137 domTechnique_Array elemTechnique_array; 00141 domExtra_Array elemExtra_array; 00142 00143 public: //Accessors and Mutators 00148 xsID getId() const { return attrId; } 00153 void setId( xsID atId ) { *(daeStringRef*)&attrId = atId; _validAttributeArray[0] = true; 00154 if( _document != NULL ) _document->changeElementID( this, attrId ); 00155 } 00156 00161 xsNCName getName() const { return attrName; } 00166 void setName( xsNCName atName ) { *(daeStringRef*)&attrName = atName; _validAttributeArray[1] = true; } 00167 00172 const domAssetRef getAsset() const { return elemAsset; } 00177 const domTechnique_commonRef getTechnique_common() const { return elemTechnique_common; } 00182 domTechnique_Array &getTechnique_array() { return elemTechnique_array; } 00187 const domTechnique_Array &getTechnique_array() const { return elemTechnique_array; } 00192 domExtra_Array &getExtra_array() { return elemExtra_array; } 00197 const domExtra_Array &getExtra_array() const { return elemExtra_array; } 00198 protected: 00202 domPhysics_material(DAE& dae) : daeElement(dae), attrId(), attrName(), elemAsset(), elemTechnique_common(), elemTechnique_array(), elemExtra_array() {} 00206 virtual ~domPhysics_material() {} 00210 virtual domPhysics_material &operator=( const domPhysics_material &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 00227 #endif