15 #include "physxCapsuleController.h" 17 TypeHandle PhysxCapsuleController::_type_handle;
24 void PhysxCapsuleController::
25 link(NxController *controllerPtr) {
27 nassertv(controllerPtr->getType() == NX_CONTROLLER_CAPSULE);
30 _ptr = (NxCapsuleController *)controllerPtr;
34 scene->_controllers.add(
this);
38 actor->link(_ptr->getActor());
39 actor->link_controller(
this);
47 void PhysxCapsuleController::
55 _error_type = ET_released;
58 scene->_controllers.remove(
this);
69 nassertv(_error_type == ET_ok);
70 _ptr->setRadius(radius);
81 nassertv(_error_type == ET_ok);
82 _ptr->setHeight(height);
93 nassertr(_error_type == ET_ok, 0.0f);
94 return _ptr->getRadius();
105 nassertr(_error_type == ET_ok, 0.0f);
106 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.
TypeHandle is the identifier used to differentiate C++ class types.