#include <fpscontroller.h>
Inheritance diagram for oxygen::FPSController:
Public Member Functions | |
FPSController () | |
virtual | ~FPSController () |
void | AdjustHAngle (const float delta) |
adds a delta increment to the current horizontal angle | |
void | AdjustVAngle (const float delta) |
adds a delta increment to the current vertical angle | |
void | Forward (const bool state) |
enables or disables forward movement | |
void | Backward (const bool state) |
enables or disables backwad movement | |
void | StrafeLeft (const bool state) |
enables or disables left strafing | |
void | StrafeRight (const bool state) |
enables or disables right strafing | |
void | Up (const bool state) |
enables or disables up movement | |
void | Down (const bool state) |
enables or disables down movement | |
void | SetAcceleration (const float accel) |
sets the applied acceleration | |
float | GetAcceleration () const |
returns the applied acceleration | |
Protected Member Functions | |
virtual void | PrePhysicsUpdateInternal (float deltaTime) |
calculates and applies the force needed to perfom the activated movements | |
Protected Attributes | |
float | mAcceleration |
the acceleration of the controller | |
float | mHAngle |
the current horizontal angle | |
float | mVAngle |
the current vertical angle | |
bool | mForward |
event state 'forward' | |
bool | mBackward |
event state 'backward' | |
bool | mLeft |
event state 'left' | |
bool | mRight |
event state 'right' | |
bool | mUp |
event state 'up' | |
bool | mDown |
event state 'down' |
moving forward, backward, strafing etc. The node maintains a state for each movement. This state can either be activated or deactivated with some accessor functions. As long as a state is activated the node performs the associated action during each time step.
Definition at line 37 of file fpscontroller.h.
|
Definition at line 29 of file fpscontroller.cpp. References mAcceleration, mBackward, mDown, mForward, mHAngle, mLeft, mRight, mUp, and mVAngle. |
|
Definition at line 42 of file fpscontroller.cpp. |
|
adds a delta increment to the current horizontal angle
Definition at line 96 of file fpscontroller.cpp. References mHAngle. |
|
adds a delta increment to the current vertical angle
Definition at line 101 of file fpscontroller.cpp. References mVAngle. |
|
enables or disables backwad movement
Definition at line 111 of file fpscontroller.cpp. References mBackward. |
|
enables or disables down movement
Definition at line 131 of file fpscontroller.cpp. References mDown. |
|
enables or disables forward movement
Definition at line 106 of file fpscontroller.cpp. References mForward. |
|
returns the applied acceleration
Definition at line 141 of file fpscontroller.cpp. References mAcceleration. |
|
calculates and applies the force needed to perfom the activated movements
Reimplemented from oxygen::BaseNode. Definition at line 46 of file fpscontroller.cpp. References salt::gDegToRad(), mAcceleration, mBackward, oxygen::BodyController::mBody, mDown, mForward, mHAngle, mLeft, mRight, mUp, mVAngle, salt::Matrix::Right(), salt::Matrix::RotateX(), salt::Matrix::RotationX(), salt::Matrix::RotationZ(), salt::TVector< DATATYPE, ELEMENTS, TYPE >::SquareLength(), salt::Matrix::Up(), salt::TVector3< DATATYPE, TYPE >::x(), salt::TVector3< DATATYPE, TYPE >::y(), and salt::TVector3< DATATYPE, TYPE >::z(). Here is the call graph for this function: ![]() |
|
sets the applied acceleration
Definition at line 136 of file fpscontroller.cpp. References mAcceleration. |
|
enables or disables left strafing
Definition at line 116 of file fpscontroller.cpp. References mLeft. |
|
enables or disables right strafing
Definition at line 121 of file fpscontroller.cpp. References mRight. |
|
enables or disables up movement
Definition at line 126 of file fpscontroller.cpp. References mUp. |
|
the acceleration of the controller
Definition at line 86 of file fpscontroller.h. Referenced by FPSController(), GetAcceleration(), PrePhysicsUpdateInternal(), and SetAcceleration(). |
|
event state 'backward'
Definition at line 100 of file fpscontroller.h. Referenced by Backward(), FPSController(), and PrePhysicsUpdateInternal(). |
|
event state 'down'
Definition at line 112 of file fpscontroller.h. Referenced by Down(), FPSController(), and PrePhysicsUpdateInternal(). |
|
event state 'forward'
Definition at line 97 of file fpscontroller.h. Referenced by Forward(), FPSController(), and PrePhysicsUpdateInternal(). |
|
the current horizontal angle
Definition at line 89 of file fpscontroller.h. Referenced by AdjustHAngle(), FPSController(), and PrePhysicsUpdateInternal(). |
|
event state 'left'
Definition at line 103 of file fpscontroller.h. Referenced by FPSController(), PrePhysicsUpdateInternal(), and StrafeLeft(). |
|
event state 'right'
Definition at line 106 of file fpscontroller.h. Referenced by FPSController(), PrePhysicsUpdateInternal(), and StrafeRight(). |
|
event state 'up'
Definition at line 109 of file fpscontroller.h. Referenced by FPSController(), PrePhysicsUpdateInternal(), and Up(). |
|
the current vertical angle
Definition at line 92 of file fpscontroller.h. Referenced by AdjustVAngle(), FPSController(), and PrePhysicsUpdateInternal(). |