Panda3D
|
A capsule character controller. More...
#include "physxCapsuleController.h"
Public Member Functions | |
virtual TypeHandle | force_init_type () |
float | get_height () const |
Returns the controller's height. | |
float | get_radius () const |
Returns the controller's radius. | |
virtual TypeHandle | get_type () const |
void | link (NxController *controllerPtr) |
NxController * | ptr () const |
void | set_height (float height) |
Resets the controller's height. | |
void | set_radius (float radius) |
Resets the controller's radius. | |
void | unlink () |
Static Public Member Functions | |
static TypeHandle | get_class_type () |
static void | init_type () |
This function is declared non-inline to work around a compiler bug in g++ 2.96. |
A capsule character controller.
The capsule is defined as a position, a vertical height, and a radius. The height is the same height as for PhysxCapsuleShape objects, i.e. the distance between the two sphere centers at the end of the capsule. In other words:
p = pos (returned by controller) h = height r = radius
p = center of capsule top sphere center = p.y + h*0.5 bottom sphere center = p.y - h*0.5 top capsule point = p.y + h*0.5 + r bottom capsule point = p.y - h*0.5 - r
Definition at line 44 of file physxCapsuleController.h.
float PhysxCapsuleController::get_height | ( | ) | const |
Returns the controller's height.
Definition at line 103 of file physxCapsuleController.cxx.
float PhysxCapsuleController::get_radius | ( | ) | const |
Returns the controller's radius.
Definition at line 91 of file physxCapsuleController.cxx.
static void PhysxCapsuleController::init_type | ( | ) | [inline, static] |
This function is declared non-inline to work around a compiler bug in g++ 2.96.
Making it inline seems to cause problems in the optimizer.
Reimplemented from PhysxController.
Definition at line 70 of file physxCapsuleController.h.
References PhysxController::init_type().
void PhysxCapsuleController::set_height | ( | float | height | ) |
Resets the controller's height.
Definition at line 79 of file physxCapsuleController.cxx.
void PhysxCapsuleController::set_radius | ( | float | radius | ) |
Resets the controller's radius.
Definition at line 67 of file physxCapsuleController.cxx.