00001 /* 00002 #ifndef _VRSODE_CAR_3DS_H_ 00003 #define _VRSODE_CAR_3DS_H_ 00004 00005 #include "CollisionSpaceSimple.h" 00006 00007 #include "PhysicsBody.h" 00008 #include "PhysicsJointHinge.h" 00009 #include "PhysicsJointHinge2.h" 00010 #include "PhysicsJointSlider.h" 00011 00012 #include <vrs/sharedobj.h> 00013 #include <vrs/camera.h> 00014 #include <vrs/sg/scenething.h> 00015 00016 namespace vrsode 00017 { 00018 00019 class Car3DS : public VRS::SharedObj 00020 { 00021 double m_springLengthFront; 00022 double m_springLengthRear; 00023 double m_springPowerFront; 00024 double m_springPowerRear; 00025 double m_springSpeedFront; 00026 double m_springSpeedRear; 00027 00028 double m_wheelSizeFront; 00029 double m_wheelSizeRear; 00030 00031 double m_wheelMass; 00032 double m_bodyMass; 00033 00034 VRS::SO<VRS::SceneThing> m_rootNode; 00035 00036 VRS::SO<CollisionSpace> m_space; 00037 00038 VRS::SO<PhysicsBody> m_chassis; 00039 00040 VRS::SO<PhysicsBody> m_wheelFL; 00041 VRS::SO<PhysicsBody> m_wheelFR; 00042 VRS::SO<PhysicsBody> m_wheelRL; 00043 VRS::SO<PhysicsBody> m_wheelRR; 00044 00045 VRS::SO<PhysicsBody> m_suspensionFL; 00046 VRS::SO<PhysicsBody> m_suspensionFR; 00047 VRS::SO<PhysicsBody> m_suspensionRL; 00048 VRS::SO<PhysicsBody> m_suspensionRR; 00049 00050 VRS::SO<PhysicsBody> m_steerFL; 00051 VRS::SO<PhysicsBody> m_steerFR; 00052 00053 VRS::SO<PhysicsJointHinge> m_axisFL; 00054 VRS::SO<PhysicsJointHinge> m_axisFR; 00055 VRS::SO<PhysicsJointHinge> m_axisRL; 00056 VRS::SO<PhysicsJointHinge> m_axisRR; 00057 00058 VRS::SO<PhysicsJointHinge> m_steerControlFL; 00059 VRS::SO<PhysicsJointHinge> m_steerControlFR; 00060 00061 VRS::SO<PhysicsJointSlider> m_springFL; 00062 VRS::SO<PhysicsJointSlider> m_springFR; 00063 VRS::SO<PhysicsJointSlider> m_springRL; 00064 VRS::SO<PhysicsJointSlider> m_springRR; 00065 00066 public: 00067 Car3DS(VRS::SO<VRS::SceneThing>); 00068 ~Car3DS(); 00069 00070 void accelerate(double); 00071 00072 void steerLeft(double); 00073 void steerRight(double); 00074 00075 void handBreak(bool); 00076 00077 void nos(double); 00078 00079 VRS::SO<VRS::SceneThing> sceneThing(); 00080 00081 void attachCamera(VRS::SO<VRS::Camera>); 00082 }; 00083 00084 } 00085 00086 #endif*/
1.5.1