Panda3D
physxVehicle.h
1 // Filename: physxVehicle.h
2 // Created by: enn0x (23Mar10)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef PHYSXVEHICLE_H
16 #define PHYSXVEHICLE_H
17 
18 #include "pandabase.h"
19 #include "pointerToArray.h"
20 
21 #include "physxObject.h"
22 #include "physx_includes.h"
23 
24 class PhysxActor;
25 class PhysxWheel;
26 class PhysxVehicleDesc;
27 class PhysxScene;
28 
29 ////////////////////////////////////////////////////////////////////
30 // Class : PhysxVehicle
31 // Description :
32 ////////////////////////////////////////////////////////////////////
33 class EXPCL_PANDAPHYSX PhysxVehicle : public PhysxObject {
34 
35 PUBLISHED:
36  INLINE PhysxVehicle();
37  INLINE ~PhysxVehicle();
38 
39  //PhysxActor *get_actor() const;
40 
41  //unsigned int get_num_wheels() const;
42  //PhysxWheel *get_wheel(unsigned int idx) const;
43  //MAKE_SEQ(get_wheels, get_num_wheels, get_wheel);
44 
45  INLINE void ls() const;
46  INLINE void ls(ostream &out, int indent_level=0) const;
47 
48 private:
49 
50 ////////////////////////////////////////////////////////////////////
51 PUBLISHED:
52  void release();
53 
54 public:
55  void create(PhysxScene *scene, PhysxVehicleDesc &desc);
56  void update_vehicle(float dt);
57 
58 private:
59  PTA(PT(PhysxWheel)) _wheels;
60  PT(PhysxActor) _actor;
61  PT(PhysxScene) _scene;
62 
63 ////////////////////////////////////////////////////////////////////
64 public:
65  static TypeHandle get_class_type() {
66  return _type_handle;
67  }
68  static void init_type() {
69  PhysxObject::init_type();
70  register_type(_type_handle, "PhysxVehicle",
71  PhysxObject::get_class_type());
72  }
73  virtual TypeHandle get_type() const {
74  return get_class_type();
75  }
76  virtual TypeHandle force_init_type() {
77  init_type();
78  return get_class_type();
79  }
80 
81 private:
82  static TypeHandle _type_handle;
83 };
84 
85 #include "physxVehicle.I"
86 
87 #endif // PHYSXVEHICLE_H
A scene is a collection of bodies, constraints, and effectors which can interact. ...
Definition: physxScene.h:73
Actors are the main simulation objects.
Definition: physxActor.h:48
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85