List of all members.
Detailed Description
The CharacterController class is to be used - as the name implies - to control a character in your game. Although the engine's collision sytem foundation does not support any kind of physics simulation, this character controller holds a gravity vector and a mass value. This is used to compute a 'physics-simulation like' jump action.
Constructor & Destructor Documentation
sp::scene::CharacterController::~CharacterController |
( |
|
) |
[virtual] |
Member Function Documentation
CollisionCapsule* sp::scene::CharacterController::getCollisionModel |
( |
|
) |
[inline] |
Returns a pointer to the character's collision model (capsule).
const CollisionCapsule* sp::scene::CharacterController::getCollisionModel |
( |
|
) |
const [inline] |
Returns a constant pointer to the character's collision model (capsule).
f32 sp::scene::CharacterController::getMaxStepHeight |
( |
|
) |
const [inline] |
Returns the maximal step height. By default the initial radius.
- See also:
- setMaxStepHeight
dim::vector3df sp::scene::CharacterController::getMovement |
( |
|
) |
const [inline] |
Returns the actual movement which is the position change from the previous to the current physics integration.
f32 sp::scene::CharacterController::getMoveSpeed |
( |
|
) |
const [inline] |
Returns the current movement speed. This is just the length of the current velocity vector, i.e. the result is equivalent to the following code:
dim::matrix3f sp::scene::CharacterController::getOrientation |
( |
|
) |
const [inline] |
Returns the orientation. By default the identity 3x3 matrix.
Returns a pointer to the character's step detector.
const CollisionCapsule* sp::scene::CharacterController::getStepDetector |
( |
|
) |
const [inline] |
Returns a constant pointer to the character's step detector. This can not be modified and is used internally to detect when the character needs to take a stair-case step.
f32 sp::scene::CharacterController::getViewRotation |
( |
|
) |
const [inline] |
Returns the character's view rotation. By default 0.0.
void sp::scene::CharacterController::jump |
( |
f32 |
Force |
) |
[virtual] |
Adds the specified force to the character object.
- Parameters:
-
| Force,: | Specifies the force which will be added to the upper vector. This is equivalent to the following code:
CharCtrl->addForce(CharCtrl->getOrientation() * dim::vector3df(0, Force, 0));
|
void sp::scene::CharacterController::move |
( |
f32 |
LeftRight, |
|
|
f32 |
ForwardsBackwards | |
|
) |
| | [inline] |
Simplification of the main "move" function.
void sp::scene::CharacterController::move |
( |
const dim::vector3df & |
Direction |
) |
[virtual] |
Adds the specified direction as a move force to the character object. The maximal move speed will not be overtraversed.
- Parameters:
-
[in] | Direction | Specifies the movement direction |
void sp::scene::CharacterController::moveBackwards |
( |
f32 |
Speed |
) |
[inline] |
Simplification of the main "move" function.
void sp::scene::CharacterController::moveForwards |
( |
f32 |
Speed |
) |
[inline] |
Simplification of the main "move" function.
void sp::scene::CharacterController::moveLeft |
( |
f32 |
Speed |
) |
[inline] |
Simplification of the main "move" function.
void sp::scene::CharacterController::moveRight |
( |
f32 |
Speed |
) |
[inline] |
Simplification of the main "move" function.
Sets the collision contact callback function. Use this to determine when a collision has been detected.
void sp::scene::CharacterController::setHeight |
( |
f32 |
Height |
) |
|
void sp::scene::CharacterController::setMaxStepHeight |
( |
f32 |
MaxHeight |
) |
|
void sp::scene::CharacterController::setOrientation |
( |
const dim::matrix3f & |
Orientation |
) |
[inline] |
Sets the new character's orientation. This specifies in which direction the character will jump and move.
void sp::scene::CharacterController::setRadius |
( |
f32 |
Radius |
) |
|
void sp::scene::CharacterController::setViewRotation |
( |
f32 |
Rotation |
) |
[inline] |
Sets the character's view rotation. This is used for further movement.
- See also:
- move
bool sp::scene::CharacterController::stayOnGround |
( |
|
) |
const [inline] |
Returns true if the character is on the ground.
void sp::scene::CharacterController::update |
( |
|
) |
[virtual] |
Updates the character controller behaviour. This includes: gravity appliance.
Friends And Related Function Documentation
Member Data Documentation
The documentation for this class was generated from the following files: