Panda3D
Loading...
Searching...
No Matches
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
19TypeHandle PhysxVehicle::_type_handle;
20
21/**
22 *
23 */
24void PhysxVehicle::
25create(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 */
41release() {
42
43 nassertv(_error_type == ET_ok);
44
45 _error_type = ET_released;
46 _scene->_vehicles.remove(this);
47}
48
49/**
50 *
51 */
52void PhysxVehicle::
53update_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/*
64PhysxActor *PhysxVehicle::
65get_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/*
76unsigned int PhysxVehicle::
77get_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/*
88PhysxWheel *PhysxVehicle::
89get_wheel(unsigned int idx) const {
90
91 nassertr(_error_type == ET_ok, NULL);
92 return _wheels[idx];
93}
94*/
A scene is a collection of bodies, constraints, and effectors which can interact.
Definition physxScene.h:69
void release()
Destroys this vehicle.
TypeHandle is the identifier used to differentiate C++ class types.
Definition typeHandle.h:81
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.