00001 #ifndef __domRigid_body_h__
00002 #define __domRigid_body_h__
00003
00004 #include <dae/daeDocument.h>
00005 #include <dom/domTypes.h>
00006 #include <dom/domElements.h>
00007
00008 #include <dom/domTargetable_float.h>
00009 #include <dom/domTranslate.h>
00010 #include <dom/domRotate.h>
00011 #include <dom/domTargetable_float3.h>
00012 #include <dom/domInstance_physics_material.h>
00013 #include <dom/domPhysics_material.h>
00014 #include <dom/domInstance_geometry.h>
00015 #include <dom/domPlane.h>
00016 #include <dom/domBox.h>
00017 #include <dom/domSphere.h>
00018 #include <dom/domCylinder.h>
00019 #include <dom/domCapsule.h>
00020 #include <dom/domExtra.h>
00021 #include <dom/domTechnique.h>
00022 class DAE;
00023
00030 class domRigid_body : public daeElement
00031 {
00032 public:
00033 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::RIGID_BODY; }
00034 static daeInt ID() { return 396; }
00035 virtual daeInt typeID() const { return ID(); }
00036 public:
00037 class domTechnique_common;
00038
00039 typedef daeSmartRef<domTechnique_common> domTechnique_commonRef;
00040 typedef daeTArray<domTechnique_commonRef> domTechnique_common_Array;
00041
00046 class domTechnique_common : public daeElement
00047 {
00048 public:
00049 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::TECHNIQUE_COMMON; }
00050 static daeInt ID() { return 397; }
00051 virtual daeInt typeID() const { return ID(); }
00052 public:
00053 class domDynamic;
00054
00055 typedef daeSmartRef<domDynamic> domDynamicRef;
00056 typedef daeTArray<domDynamicRef> domDynamic_Array;
00057
00061 class domDynamic : public daeElement
00062 {
00063 public:
00064 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::DYNAMIC; }
00065 static daeInt ID() { return 398; }
00066 virtual daeInt typeID() const { return ID(); }
00067 protected:
00073 domSid attrSid;
00074
00075
00076 public:
00081 domSid getSid() const { return attrSid; }
00086 void setSid( domSid atSid ) { *(daeStringRef*)&attrSid = atSid; _validAttributeArray[0] = true; }
00087
00092 xsBoolean& getValue() { return _value; }
00097 void setValue( const xsBoolean& val ) { _value = val; }
00098
00099 protected:
00103 xsBoolean _value;
00104 protected:
00108 domDynamic(DAE& dae) : daeElement(dae), attrSid(), _value() {}
00112 virtual ~domDynamic() {}
00116 virtual domDynamic &operator=( const domDynamic &cpy ) { (void)cpy; return *this; }
00117
00118 public:
00123 static DLLSPEC daeElementRef create(DAE& dae);
00129 static DLLSPEC daeMetaElement* registerElement(DAE& dae);
00130 };
00131
00132 class domMass_frame;
00133
00134 typedef daeSmartRef<domMass_frame> domMass_frameRef;
00135 typedef daeTArray<domMass_frameRef> domMass_frame_Array;
00136
00143 class domMass_frame : public daeElement
00144 {
00145 public:
00146 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::MASS_FRAME; }
00147 static daeInt ID() { return 399; }
00148 virtual daeInt typeID() const { return ID(); }
00149
00150 protected:
00151 domTranslate_Array elemTranslate_array;
00152 domRotate_Array elemRotate_array;
00156 daeElementRefArray _contents;
00160 daeUIntArray _contentsOrder;
00161
00165 daeTArray< daeCharArray * > _CMData;
00166
00167
00168 public:
00173 domTranslate_Array &getTranslate_array() { return elemTranslate_array; }
00178 const domTranslate_Array &getTranslate_array() const { return elemTranslate_array; }
00183 domRotate_Array &getRotate_array() { return elemRotate_array; }
00188 const domRotate_Array &getRotate_array() const { return elemRotate_array; }
00193 daeElementRefArray &getContents() { return _contents; }
00198 const daeElementRefArray &getContents() const { return _contents; }
00199
00200 protected:
00204 domMass_frame(DAE& dae) : daeElement(dae), elemTranslate_array(), elemRotate_array() {}
00208 virtual ~domMass_frame() { daeElement::deleteCMDataArray(_CMData); }
00212 virtual domMass_frame &operator=( const domMass_frame &cpy ) { (void)cpy; return *this; }
00213
00214 public:
00219 static DLLSPEC daeElementRef create(DAE& dae);
00225 static DLLSPEC daeMetaElement* registerElement(DAE& dae);
00226 };
00227
00228 class domShape;
00229
00230 typedef daeSmartRef<domShape> domShapeRef;
00231 typedef daeTArray<domShapeRef> domShape_Array;
00232
00236 class domShape : public daeElement
00237 {
00238 public:
00239 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::SHAPE; }
00240 static daeInt ID() { return 400; }
00241 virtual daeInt typeID() const { return ID(); }
00242 public:
00243 class domHollow;
00244
00245 typedef daeSmartRef<domHollow> domHollowRef;
00246 typedef daeTArray<domHollowRef> domHollow_Array;
00247
00251 class domHollow : public daeElement
00252 {
00253 public:
00254 virtual COLLADA_TYPE::TypeEnum getElementType() const { return COLLADA_TYPE::HOLLOW; }
00255 static daeInt ID() { return 401; }
00256 virtual daeInt typeID() const { return ID(); }
00257 protected:
00263 domSid attrSid;
00264
00265
00266 public:
00271 domSid getSid() const { return attrSid; }
00276 void setSid( domSid atSid ) { *(daeStringRef*)&attrSid = atSid; _validAttributeArray[0] = true; }
00277
00282 xsBoolean& getValue() { return _value; }
00287 void setValue( const xsBoolean& val ) { _value = val; }
00288
00289 protected:
00293 xsBoolean _value;
00294 protected:
00298 domHollow(DAE& dae) : daeElement(dae), attrSid(), _value() {}
00302 virtual ~domHollow() {}
00306 virtual domHollow &operator=( const domHollow &cpy ) { (void)cpy; return *this; }
00307
00308 public:
00313 static DLLSPEC daeElementRef create(DAE& dae);
00319 static DLLSPEC daeMetaElement* registerElement(DAE& dae);
00320 };
00321
00322
00323
00324 protected:
00328 domHollowRef elemHollow;
00332 domTargetable_floatRef elemMass;
00336 domTargetable_floatRef elemDensity;
00340 domInstance_physics_materialRef elemInstance_physics_material;
00344 domPhysics_materialRef elemPhysics_material;
00348 domInstance_geometryRef elemInstance_geometry;
00352 domPlaneRef elemPlane;
00356 domBoxRef elemBox;
00360 domSphereRef elemSphere;
00364 domCylinderRef elemCylinder;
00368 domCapsuleRef elemCapsule;
00372 domTranslate_Array elemTranslate_array;
00376 domRotate_Array elemRotate_array;
00380 domExtra_Array elemExtra_array;
00384 daeElementRefArray _contents;
00388 daeUIntArray _contentsOrder;
00389
00393 daeTArray< daeCharArray * > _CMData;
00394
00395
00396 public:
00401 const domHollowRef getHollow() const { return elemHollow; }
00406 const domTargetable_floatRef getMass() const { return elemMass; }
00411 const domTargetable_floatRef getDensity() const { return elemDensity; }
00416 const domInstance_physics_materialRef getInstance_physics_material() const { return elemInstance_physics_material; }
00421 const domPhysics_materialRef getPhysics_material() const { return elemPhysics_material; }
00426 const domInstance_geometryRef getInstance_geometry() const { return elemInstance_geometry; }
00431 const domPlaneRef getPlane() const { return elemPlane; }
00436 const domBoxRef getBox() const { return elemBox; }
00441 const domSphereRef getSphere() const { return elemSphere; }
00446 const domCylinderRef getCylinder() const { return elemCylinder; }
00451 const domCapsuleRef getCapsule() const { return elemCapsule; }
00456 domTranslate_Array &getTranslate_array() { return elemTranslate_array; }
00461 const domTranslate_Array &getTranslate_array() const { return elemTranslate_array; }
00466 domRotate_Array &getRotate_array() { return elemRotate_array; }
00471 const domRotate_Array &getRotate_array() const { return elemRotate_array; }
00476 domExtra_Array &getExtra_array() { return elemExtra_array; }
00481 const domExtra_Array &getExtra_array() const { return elemExtra_array; }
00486 daeElementRefArray &getContents() { return _contents; }
00491 const daeElementRefArray &getContents() const { return _contents; }
00492
00493 protected:
00497 domShape(DAE& dae) : daeElement(dae), elemHollow(), elemMass(), elemDensity(), elemInstance_physics_material(), elemPhysics_material(), elemInstance_geometry(), elemPlane(), elemBox(), elemSphere(), elemCylinder(), elemCapsule(), elemTranslate_array(), elemRotate_array(), elemExtra_array() {}
00501 virtual ~domShape() { daeElement::deleteCMDataArray(_CMData); }
00505 virtual domShape &operator=( const domShape &cpy ) { (void)cpy; return *this; }
00506
00507 public:
00512 static DLLSPEC daeElementRef create(DAE& dae);
00518 static DLLSPEC daeMetaElement* registerElement(DAE& dae);
00519 };
00520
00521
00522
00523 protected:
00527 domDynamicRef elemDynamic;
00531 domTargetable_floatRef elemMass;
00538 domMass_frameRef elemMass_frame;
00544 domTargetable_float3Ref elemInertia;
00548 domInstance_physics_materialRef elemInstance_physics_material;
00552 domPhysics_materialRef elemPhysics_material;
00556 domShape_Array elemShape_array;
00560 daeElementRefArray _contents;
00564 daeUIntArray _contentsOrder;
00565
00569 daeTArray< daeCharArray * > _CMData;
00570
00571
00572 public:
00577 const domDynamicRef getDynamic() const { return elemDynamic; }
00582 const domTargetable_floatRef getMass() const { return elemMass; }
00587 const domMass_frameRef getMass_frame() const { return elemMass_frame; }
00592 const domTargetable_float3Ref getInertia() const { return elemInertia; }
00597 const domInstance_physics_materialRef getInstance_physics_material() const { return elemInstance_physics_material; }
00602 const domPhysics_materialRef getPhysics_material() const { return elemPhysics_material; }
00607 domShape_Array &getShape_array() { return elemShape_array; }
00612 const domShape_Array &getShape_array() const { return elemShape_array; }
00617 daeElementRefArray &getContents() { return _contents; }
00622 const daeElementRefArray &getContents() const { return _contents; }
00623
00624 protected:
00628 domTechnique_common(DAE& dae) : daeElement(dae), elemDynamic(), elemMass(), elemMass_frame(), elemInertia(), elemInstance_physics_material(), elemPhysics_material(), elemShape_array() {}
00632 virtual ~domTechnique_common() { daeElement::deleteCMDataArray(_CMData); }
00636 virtual domTechnique_common &operator=( const domTechnique_common &cpy ) { (void)cpy; return *this; }
00637
00638 public:
00643 static DLLSPEC daeElementRef create(DAE& dae);
00649 static DLLSPEC daeMetaElement* registerElement(DAE& dae);
00650 };
00651
00652
00653 protected:
00654 xsID attrId;
00660 domSid attrSid;
00664 xsToken attrName;
00665
00666 protected:
00672 domTechnique_commonRef elemTechnique_common;
00677 domTechnique_Array elemTechnique_array;
00681 domExtra_Array elemExtra_array;
00682
00683 public:
00688 xsID getId() const { return attrId; }
00693 void setId( xsID atId ) { *(daeStringRef*)&attrId = atId;
00694 if( _document != NULL ) _document->changeElementID( this, attrId );
00695 }
00696
00701 domSid getSid() const { return attrSid; }
00706 void setSid( domSid atSid ) { *(daeStringRef*)&attrSid = atSid;}
00707
00712 xsToken getName() const { return attrName; }
00717 void setName( xsToken atName ) { *(daeStringRef*)&attrName = atName;}
00718
00723 const domTechnique_commonRef getTechnique_common() const { return elemTechnique_common; }
00728 domTechnique_Array &getTechnique_array() { return elemTechnique_array; }
00733 const domTechnique_Array &getTechnique_array() const { return elemTechnique_array; }
00738 domExtra_Array &getExtra_array() { return elemExtra_array; }
00743 const domExtra_Array &getExtra_array() const { return elemExtra_array; }
00744 protected:
00748 domRigid_body(DAE& dae) : daeElement(dae), attrId(), attrSid(), attrName(), elemTechnique_common(), elemTechnique_array(), elemExtra_array() {}
00752 virtual ~domRigid_body() {}
00756 virtual domRigid_body &operator=( const domRigid_body &cpy ) { (void)cpy; return *this; }
00757
00758 public:
00763 static DLLSPEC daeElementRef create(DAE& dae);
00769 static DLLSPEC daeMetaElement* registerElement(DAE& dae);
00770 };
00771
00772
00773 #endif