Panda3D
 All Classes Functions Variables Enumerations
bulletWheel.h
00001 // Filename: bulletWheel.h
00002 // Created by:  enn0x (17Feb10)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 #ifndef __BULLET_WHEEL_H__
00016 #define __BULLET_WHEEL_H__
00017 
00018 #include "pandabase.h"
00019 
00020 #include "bullet_includes.h"
00021 #include "bullet_utils.h"
00022 
00023 #include "luse.h"
00024 #include "pandaNode.h"
00025 
00026 ////////////////////////////////////////////////////////////////////
00027 //       Class : BulletWheel
00028 // Description : One wheel of a BulletVehicle. Instances should not
00029 //               be created directly but using the factory method
00030 //               BulletVehicle::create_wheel().
00031 ////////////////////////////////////////////////////////////////////
00032 class EXPCL_PANDABULLET BulletWheel {
00033 
00034 PUBLISHED:
00035   INLINE ~BulletWheel();
00036 
00037   void set_suspension_stiffness(PN_stdfloat value);
00038   void set_max_suspension_travel_cm(PN_stdfloat value);
00039   void set_friction_slip(PN_stdfloat value);
00040   void set_max_suspension_force(PN_stdfloat value);
00041   void set_wheels_damping_compression(PN_stdfloat value);
00042   void set_wheels_damping_relaxation(PN_stdfloat value);
00043   void set_roll_influence(PN_stdfloat value);
00044   void set_wheel_radius(PN_stdfloat value);
00045   void set_steering(PN_stdfloat value);
00046   void set_rotation(PN_stdfloat value);
00047   void set_delta_rotation(PN_stdfloat value);
00048   void set_engine_force(PN_stdfloat value);
00049   void set_brake(PN_stdfloat value);
00050   void set_skid_info(PN_stdfloat value);
00051   void set_wheels_suspension_force(PN_stdfloat value);
00052   void set_suspension_relative_velocity(PN_stdfloat value);
00053   void set_clipped_inv_connection_point_cs(PN_stdfloat value);
00054   void set_chassis_connection_point_cs(const LPoint3 &pos);
00055   void set_wheel_direction_cs(const LVector3 &dir);
00056   void set_wheel_axle_cs(const LVector3 &axle);
00057   void set_world_transform(const LMatrix4 &mat);
00058   void set_front_wheel(bool value);
00059   void set_node(PandaNode *node);
00060 
00061   PN_stdfloat get_suspension_rest_length() const;
00062   PN_stdfloat get_suspension_stiffness() const;
00063   PN_stdfloat get_max_suspension_travel_cm() const;
00064   PN_stdfloat get_friction_slip() const;
00065   PN_stdfloat get_max_suspension_force() const;
00066   PN_stdfloat get_wheels_damping_compression() const;
00067   PN_stdfloat get_wheels_damping_relaxation() const;
00068   PN_stdfloat get_roll_influence() const;
00069   PN_stdfloat get_wheel_radius() const;
00070   PN_stdfloat get_steering() const;
00071   PN_stdfloat get_rotation() const;
00072   PN_stdfloat get_delta_rotation() const;
00073   PN_stdfloat get_engine_force() const;
00074   PN_stdfloat get_brake() const;
00075   PN_stdfloat get_skid_info() const;
00076   PN_stdfloat get_wheels_suspension_force() const;
00077   PN_stdfloat get_suspension_relative_velocity() const;
00078   PN_stdfloat get_clipped_inv_connection_point_cs() const;
00079   LPoint3 get_chassis_connection_point_cs() const;
00080   LVector3 get_wheel_direction_cs() const;
00081   LVector3 get_wheel_axle_cs() const;
00082   LMatrix4 get_world_transform() const;
00083   bool is_front_wheel() const;
00084   PandaNode *get_node() const;
00085 
00086 public:
00087   BulletWheel(btWheelInfo &info);
00088 
00089   INLINE static BulletWheel empty();
00090 
00091 private:
00092   btWheelInfo &_info;
00093 };
00094 
00095 #include "bulletWheel.I"
00096 
00097 #endif // __BULLET_WHEEL_H__
 All Classes Functions Variables Enumerations