RigsofRods
Soft-body Physics Simulation
Public Member Functions | Private Attributes
SkyX::Controller Class Referenceabstract

Controller base class. More...

#include <Controller.h>

+ Inheritance diagram for SkyX::Controller:

Public Member Functions

 Controller (const bool &deleteBySkyX)
 Constructor. More...
 
virtual ~Controller ()
 Destructor. More...
 
virtual void update (const Ogre::Real &simDeltaTime)
 Update controller. More...
 
virtual Ogre::Vector3 getSunDirection ()=0
 Get sun direction. More...
 
virtual Ogre::Vector3 getMoonDirection ()=0
 Get moon direction. More...
 
virtual Ogre::Real getMoonPhase ()=0
 Get moon phase. More...
 
const bool & getDeleteBySkyX () const
 Must the controller be destroyed by SkyX? More...
 

Private Attributes

bool mDeleteBySkyX
 Must the controller be destroyed by SkyX? More...
 

Detailed Description

Controller base class.

Definition at line 33 of file Controller.h.

Constructor & Destructor Documentation

◆ Controller()

SkyX::Controller::Controller ( const bool &  deleteBySkyX)
inline

Constructor.

Parameters
deleteBySkyXtrue to automatically destroy the controller by SkyX, false otherwise

Definition at line 39 of file Controller.h.

◆ ~Controller()

virtual SkyX::Controller::~Controller ( )
inlinevirtual

Destructor.

Definition at line 46 of file Controller.h.

Member Function Documentation

◆ getDeleteBySkyX()

const bool& SkyX::Controller::getDeleteBySkyX ( ) const
inline

Must the controller be destroyed by SkyX?

Returns
true if yes, false if not

Definition at line 72 of file Controller.h.

◆ getMoonDirection()

virtual Ogre::Vector3 SkyX::Controller::getMoonDirection ( )
pure virtual

Get moon direction.

Returns
Moon direction, Earth-to-Moon direction

Implemented in SkyX::BasicController.

+ Here is the caller graph for this function:

◆ getMoonPhase()

virtual Ogre::Real SkyX::Controller::getMoonPhase ( )
pure virtual

Get moon phase.

Returns
Moon phase in [-1,1] range, where -1 means fully covered Moon, 0 clear Moon and 1 fully covered Moon

Implemented in SkyX::BasicController.

◆ getSunDirection()

virtual Ogre::Vector3 SkyX::Controller::getSunDirection ( )
pure virtual

Get sun direction.

Returns
Sun direction, the Earth-to-Sun direction

Implemented in SkyX::BasicController.

+ Here is the caller graph for this function:

◆ update()

virtual void SkyX::Controller::update ( const Ogre::Real &  simDeltaTime)
inlinevirtual

Update controller.

Parameters
simDeltaTimeSimulation 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 in SkyX::BasicController.

Definition at line 52 of file Controller.h.

Field Documentation

◆ mDeleteBySkyX

bool SkyX::Controller::mDeleteBySkyX
private

Must the controller be destroyed by SkyX?

Definition at line 79 of file Controller.h.


The documentation for this class was generated from the following file: