15 #include "physxVehicle.h" 16 #include "physxActor.h" 17 #include "physxWheel.h" 18 #include "physxScene.h" 30 nassertv(_error_type == ET_empty);
37 _scene->_vehicles.add(
this);
48 nassertv(_error_type == ET_ok);
50 _error_type = ET_released;
51 _scene->_vehicles.remove(
this);
60 update_vehicle(
float dt) {
62 nassertv(_error_type == ET_ok);
69 // Function: PhysxVehicle::get_actor
71 // Description: Returns the actor for this vehicle.
73 PhysxActor *PhysxVehicle::
76 nassertr(_error_type == ET_ok, NULL);
83 // Function: PhysxVehicle::get_num_wheels
85 // Description: Returns the number of wheels on this vehicle.
87 unsigned int PhysxVehicle::
88 get_num_wheels() const {
90 nassertr(_error_type == ET_ok, 0);
91 return _wheels.size();
95 // Function: PhysxVehicle::get_wheel
97 // Description: Returns the n-th wheel of this vehicle.
99 PhysxWheel *PhysxVehicle::
100 get_wheel(unsigned int idx) const {
102 nassertr(_error_type == ET_ok, NULL);
A scene is a collection of bodies, constraints, and effectors which can interact. ...
void release()
Destroys this vehicle.
TypeHandle is the identifier used to differentiate C++ class types.