RigsofRods
Soft-body Physics Simulation
|
Basic controller class
More...
#include <BasicController.h>
Public Member Functions | |
BasicController (const bool &deleteBySkyX=true) | |
Constructor. More... | |
void | update (const Ogre::Real &simDeltaTime) |
Update controller. More... | |
void | setTime (const Ogre::Vector3 &t) |
Set time. More... | |
const Ogre::Vector3 & | getTime () const |
Get time. More... | |
void | setEastDirection (const Ogre::Vector2 &ed) |
Set eastn direction. More... | |
const Ogre::Vector2 & | getEastDirection () const |
Get east direction. More... | |
Ogre::Vector3 | getSunDirection () |
Get sun direction. More... | |
Ogre::Vector3 | getMoonDirection () |
Get moon direction. More... | |
void | setMoonPhase (const Ogre::Real &mp) |
Set moon phase. More... | |
Ogre::Real | getMoonPhase () |
Get moon phase. More... | |
Public Member Functions inherited from SkyX::Controller | |
Controller (const bool &deleteBySkyX) | |
Constructor. More... | |
virtual | ~Controller () |
Destructor. More... | |
const bool & | getDeleteBySkyX () const |
Must the controller be destroyed by SkyX? More... | |
Private Attributes | |
Ogre::Vector3 | mTime |
Time information: x = time in [0, 24]h range, y = sunrise hour in [0, 24]h range, z = sunset hour in [0, 24] range. More... | |
Ogre::Vector2 | mEastDirection |
East direction (in X,Z world coords) More... | |
Ogre::Vector3 | mSunDirection |
Sun direction. More... | |
Ogre::Vector3 | mMoonDirection |
Moon direction. More... | |
Ogre::Real | mMoonPhase |
Moon phase. More... | |
Basic controller class
Definition at line 35 of file BasicController.h.
SkyX::BasicController::BasicController | ( | const bool & | deleteBySkyX = true | ) |
Constructor.
deleteBySkyX | true to automatically destroy the controller by SkyX, false otherwise |
Definition at line 28 of file BasicController.cpp.
|
inline |
Get east direction.
Definition at line 78 of file BasicController.h.
|
inlinevirtual |
Get moon direction.
Implements SkyX::Controller.
Definition at line 94 of file BasicController.h.
|
inlinevirtual |
Get moon phase.
Implements SkyX::Controller.
Definition at line 110 of file BasicController.h.
|
inlinevirtual |
Get sun direction.
Implements SkyX::Controller.
Definition at line 86 of file BasicController.h.
|
inline |
Get time.
Definition at line 61 of file BasicController.h.
|
inline |
Set eastn direction.
ed | East direction, in X,Z world coords (must be normalized) |
Definition at line 69 of file BasicController.h.
|
inline |
Set moon phase.
mp | Moon phase in [-1,1] range, where -1 means fully covered Moon, 0 clear Moon and 1 fully covered Moon |
Definition at line 102 of file BasicController.h.
|
inline |
Set time.
t | Time, where x = time in [0, 24]h range, y = sunrise hour in [0, 24]h range, z = sunset hour in [0, 24] range |
Definition at line 52 of file BasicController.h.
|
virtual |
Update controller.
simDeltaTime | Simulation delta time (It's not the time since last frame, it's the delta simulation time, one time the time since last frame has been multiplied by the time multiplier) |
Reimplemented from SkyX::Controller.
Definition at line 38 of file BasicController.cpp.
|
private |
East direction (in X,Z world coords)
Definition at line 119 of file BasicController.h.
|
private |
Moon direction.
Definition at line 124 of file BasicController.h.
|
private |
Moon phase.
Definition at line 126 of file BasicController.h.
|
private |
Sun direction.
Definition at line 122 of file BasicController.h.
|
private |
Time information: x = time in [0, 24]h range, y = sunrise hour in [0, 24]h range, z = sunset hour in [0, 24] range.
Definition at line 117 of file BasicController.h.