Panda3D
panda
src
physx
physxVehicle.cxx
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.cxx
10
* @author enn0x
11
* @date 2010-03-23
12
*/
13
14
#include "
physxVehicle.h
"
15
#include "
physxActor.h
"
16
#include "
physxWheel.h
"
17
#include "
physxScene.h
"
18
19
TypeHandle
PhysxVehicle::_type_handle;
20
21
/**
22
*
23
*/
24
void
PhysxVehicle::
25
create(
PhysxScene
*scene,
PhysxVehicleDesc
&desc) {
26
27
nassertv(_error_type == ET_empty);
28
29
_scene = scene;
30
31
// TODO !!!
32
33
_error_type = ET_ok;
34
_scene->_vehicles.add(
this
);
35
}
36
37
/**
38
* Destroys this vehicle.
39
*/
40
void
PhysxVehicle::
41
release
() {
42
43
nassertv(_error_type == ET_ok);
44
45
_error_type = ET_released;
46
_scene->_vehicles.remove(
this
);
47
}
48
49
/**
50
*
51
*/
52
void
PhysxVehicle::
53
update_vehicle(
float
dt) {
54
55
nassertv(_error_type == ET_ok);
56
57
// TODO !!!
58
}
59
60
/**
61
* Returns the actor for this vehicle.
62
*/
63
/*
64
PhysxActor *PhysxVehicle::
65
get_actor() const {
66
67
nassertr(_error_type == ET_ok, NULL);
68
return _actor;
69
}
70
*/
71
72
/**
73
* Returns the number of wheels on this vehicle.
74
*/
75
/*
76
unsigned int PhysxVehicle::
77
get_num_wheels() const {
78
79
nassertr(_error_type == ET_ok, 0);
80
return _wheels.size();
81
}
82
*/
83
84
/**
85
* Returns the n-th wheel of this vehicle.
86
*/
87
/*
88
PhysxWheel *PhysxVehicle::
89
get_wheel(unsigned int idx) const {
90
91
nassertr(_error_type == ET_ok, NULL);
92
return _wheels[idx];
93
}
94
*/
PhysxVehicleDesc
Definition:
physxVehicleDesc.h:24
physxWheel.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PhysxVehicle::release
void release()
Destroys this vehicle.
Definition:
physxVehicle.cxx:41
physxScene.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
TypeHandle
TypeHandle is the identifier used to differentiate C++ class types.
Definition:
typeHandle.h:81
physxVehicle.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PhysxScene
A scene is a collection of bodies, constraints, and effectors which can interact.
Definition:
physxScene.h:69
physxActor.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Generated on Sun Dec 27 2020 13:23:14 for Panda3D by
1.8.20