16 TypeHandle PhysxCapsuleController::_type_handle;
21 void PhysxCapsuleController::
22 link(NxController *controllerPtr) {
24 nassertv(controllerPtr->getType() == NX_CONTROLLER_CAPSULE);
27 _ptr = (NxCapsuleController *)controllerPtr;
31 scene->_controllers.add(
this);
35 actor->link(_ptr->getActor());
36 actor->link_controller(
this);
42 void PhysxCapsuleController::
50 _error_type = ET_released;
53 scene->_controllers.remove(
this);
62 nassertv(_error_type == ET_ok);
63 _ptr->setRadius(radius);
72 nassertv(_error_type == ET_ok);
73 _ptr->setHeight(height);
82 nassertr(_error_type == ET_ok, 0.0f);
83 return _ptr->getRadius();
92 nassertr(_error_type == ET_ok, 0.0f);
93 return _ptr->getHeight();
float get_radius() const
Returns the controller's radius.
void set_height(float height)
Resets the controller's height.
A scene is a collection of bodies, constraints, and effectors which can interact.
void set_radius(float radius)
Resets the controller's radius.
Actors are the main simulation objects.
float get_height() const
Returns the controller's height.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
TypeHandle is the identifier used to differentiate C++ class types.