Panda3D

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