00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #include "physxVehicle.h"
00016 #include "physxActor.h"
00017 #include "physxWheel.h"
00018 #include "physxScene.h"
00019
00020 TypeHandle PhysxVehicle::_type_handle;
00021
00022
00023
00024
00025
00026
00027 void PhysxVehicle::
00028 create(PhysxScene *scene, PhysxVehicleDesc &desc) {
00029
00030 nassertv(_error_type == ET_empty);
00031
00032 _scene = scene;
00033
00034
00035
00036 _error_type = ET_ok;
00037 _scene->_vehicles.add(this);
00038 }
00039
00040
00041
00042
00043
00044
00045 void PhysxVehicle::
00046 release() {
00047
00048 nassertv(_error_type == ET_ok);
00049
00050 _error_type = ET_released;
00051 _scene->_vehicles.remove(this);
00052 }
00053
00054
00055
00056
00057
00058
00059 void PhysxVehicle::
00060 update_vehicle(float dt) {
00061
00062 nassertv(_error_type == ET_ok);
00063
00064
00065 }
00066
00067
00068
00069 // Function: PhysxVehicle::get_actor
00070 // Access: Published
00071 // Description: Returns the actor for this vehicle.
00072
00073 PhysxActor *PhysxVehicle::
00074 get_actor() const {
00075
00076 nassertr(_error_type == ET_ok, NULL);
00077 return _actor;
00078 }
00079 */
00080
00081
00082
00083 // Function: PhysxVehicle::get_num_wheels
00084 // Access: Published
00085 // Description: Returns the number of wheels on this vehicle.
00086
00087 unsigned int PhysxVehicle::
00088 get_num_wheels() const {
00089
00090 nassertr(_error_type == ET_ok, 0);
00091 return _wheels.size();
00092 }
00093
00094
00095 // Function: PhysxVehicle::get_wheel
00096 // Access: Published
00097 // Description: Returns the n-th wheel of this vehicle.
00098
00099 PhysxWheel *PhysxVehicle::
00100 get_wheel(unsigned int idx) const {
00101
00102 nassertr(_error_type == ET_ok, NULL);
00103 return _wheels[idx];
00104 }
00105 */
00106