Emergency 20 Dokumentation  4.2.0
em5::IngameCameraInputHandler Class Reference

EMERGENCY 5 in-game camera input handler class. More...

#include <IngameCameraInputHandler.h>

Inheritance diagram for em5::IngameCameraInputHandler:
qsf::OrbitingCameraInputHandler qsf::FreeMoveInputHandler qsf::EntityInputHandler qsf::InputHandler qsf::InputListener

Public Member Functions

 IngameCameraInputHandler (uint32 id)
 Constructor. More...
virtual ~IngameCameraInputHandler ()
 Destructor. More...
qsf::EntitygetCameraFollowEntity () const
void setCameraFollowEntity (qsf::Entity *followEntity)
void updateCameraFollowEntity (const qsf::JobArguments &jobArguments)
 Update the camera. More...
void internalUpdateInputHandler (const qsf::Time &timePassed, bool inputBlocked)
float getMinimumZoomout () const
float getMaximumZoomout () const
void setMaximumZoomout (float maximumZoomout)
void setMaximumPitch (float maximumPitch)
float getCurrentZoomout () const
virtual void updateInputHandler (const qsf::Time &timePassed) override
 Update the input handler. More...
virtual void eventReceived (const qsf::InputEvent &inputEvent, Response &response) override
 React to input events. More...
- Public Member Functions inherited from qsf::OrbitingCameraInputHandler
 OrbitingCameraInputHandler (uint32 id)
 Constructor. More...
virtual ~OrbitingCameraInputHandler ()
 Destructor. More...
CameraComponentgetCameraComponent () const
 Return target entity's camera component, or a null pointer. More...
- Public Member Functions inherited from qsf::FreeMoveInputHandler
 FreeMoveInputHandler (uint32 id)
 Constructor. More...
virtual ~FreeMoveInputHandler ()
 Destructor. More...
float getMoveSpeed () const
 Return the move speed. More...
void setMoveSpeed (float moveSpeed)
 Set the move speed. More...
float getWheelMoveSpeed () const
 Return the wheel move speed. More...
void setWheelMoveSpeed (float moveSpeed)
 Set the wheel move speed. More...
float getRotateSpeed () const
 Return the rotate speed. More...
void setRotateSpeed (float rotateSpeed)
 Set the rotate speed. More...
float getDefaultMoveSpeed () const
void setNullSpeedWithAltKeyEnabled (bool enable)
const FreeMoveInputDevicegetFreeMoveInputDevice ()
virtual void initialize () override
 Gets called after the input handler was created -> This is needed to support special initialization in derived classes. More...
- Public Member Functions inherited from qsf::EntityInputHandler
 EntityInputHandler (uint32 id)
 Constructor. More...
virtual ~EntityInputHandler ()
 Destructor. More...
void setEntityById (uint64 entityId)
 Set target entity that will be directly controlled by this input handler. More...
- Public Member Functions inherited from qsf::InputHandler
 InputHandler (uint32 id)
 Constructor. More...
virtual ~InputHandler ()
 Destructor. More...
uint32 getId ()
 Return the handler's ID. More...
- Public Member Functions inherited from qsf::InputListener
 InputListener ()
 Default constructor. More...
virtual ~InputListener ()
 Destructor. More...
WindowgetFocusWindow () const
 Return the focus window. More...
void setFocusWindow (Window *focusWindow)
 Set focus window. More...

Protected Member Functions

virtual void startupForEntity (qsf::Entity &entity) override
virtual void shutdownForEntity (qsf::Entity &entity) override
- Protected Member Functions inherited from qsf::OrbitingCameraInputHandler
void dropTargetPointToGround (glm::vec3 &point, float offsetAboveGround, bool terrainOnly=true) const
void dropTargetPointToGround (glm::vec3 &point, float offsetAboveGround, uint32 groundMapId) const
- Protected Member Functions inherited from qsf::FreeMoveInputHandler
virtual void setupInputFeeder ()
 Gets called to setup the input feeder. More...
CameraControlComponentgetCameraControlComponent () const
float getSpeedModifier () const
glm::vec3 getMovementDelta () const
glm::quat getNewRotation (float *outYaw=nullptr, float *outPitch=nullptr) const
float getMouseWheelDelta () const
void backupPositionRotation ()
void setNewPosition (const glm::vec3 &newPosition)
void setNewRotation (const glm::quat &newRotation)
- Protected Member Functions inherited from qsf::EntityInputHandler
EntitygetEntity () const
 Return target entity, or a null pointer. More...
TransformComponentgetTransformComponent () const
 Return target entity's transform component; can be a null pointer if the entity does not exist or has no transform component. More...

Additional Inherited Members

- Public Attributes inherited from qsf::FreeMoveInputHandler
boost::signals2::signal< void(const glm::vec3 &, const glm::vec3 &)> PositionChanged
 This Boost signal is emitted after the entity position has been changed; parameter: previous and new position. More...
boost::signals2::signal< void(const glm::quat &, const glm::quat &)> RotationChanged
 This Boost signal is emitted after the entity rotation has been changed; parameter: previous and new rotation. More...
- Protected Attributes inherited from qsf::FreeMoveInputHandler
float mMoveSpeed
 Move speed in world units per second. More...
float mWheelMoveSpeed
 Move speed for mouse wheel in world units per wheel step. More...
float mRotateSpeed
 Rotate speed in degrees per screen pixel. More...
 Input device holding the key bindings; always valid, do not destroy. More...
glm::vec3 mLastPosition
glm::quat mLastRotation
bool mNullSpeedWithAltKeyEnabled

Detailed Description

EMERGENCY 5 in-game camera input handler class.

Rotates around a target point, which is always bound to the ground. Directly manipulates the "qsf::TransformComponent"-component without performing any kind of collision detection of physics.

Constructor & Destructor Documentation

em5::IngameCameraInputHandler::IngameCameraInputHandler ( uint32  id)


virtual em5::IngameCameraInputHandler::~IngameCameraInputHandler ( )


Member Function Documentation

virtual void em5::IngameCameraInputHandler::eventReceived ( const qsf::InputEvent inputEvent,
Response response 

React to input events.

Reimplemented from qsf::OrbitingCameraInputHandler.

qsf::Entity* em5::IngameCameraInputHandler::getCameraFollowEntity ( ) const
float em5::IngameCameraInputHandler::getCurrentZoomout ( ) const
float em5::IngameCameraInputHandler::getMaximumZoomout ( ) const
float em5::IngameCameraInputHandler::getMinimumZoomout ( ) const
void em5::IngameCameraInputHandler::internalUpdateInputHandler ( const qsf::Time timePassed,
bool  inputBlocked 
void em5::IngameCameraInputHandler::setCameraFollowEntity ( qsf::Entity followEntity)
void em5::IngameCameraInputHandler::setMaximumPitch ( float  maximumPitch)
void em5::IngameCameraInputHandler::setMaximumZoomout ( float  maximumZoomout)
virtual void em5::IngameCameraInputHandler::shutdownForEntity ( qsf::Entity entity)

Reimplemented from qsf::EntityInputHandler.

virtual void em5::IngameCameraInputHandler::startupForEntity ( qsf::Entity entity)

Reimplemented from qsf::OrbitingCameraInputHandler.

void em5::IngameCameraInputHandler::updateCameraFollowEntity ( const qsf::JobArguments jobArguments)

Update the camera.

virtual void em5::IngameCameraInputHandler::updateInputHandler ( const qsf::Time timePassed)

Update the input handler.

Reimplemented from qsf::OrbitingCameraInputHandler.

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