LibCarna Version 3.4.0
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
LibCarna::presets::CameraShowcaseControl Class Reference

Implements base::CameraControl, rotates the camera around its parent node. The camera movement is bounded to the rail from its parent to its current location. More...

#include <CameraShowcaseControl.hpp>

+ Inheritance diagram for LibCarna::presets::CameraShowcaseControl:
+ Collaboration diagram for LibCarna::presets::CameraShowcaseControl:

Public Member Functions

 CameraShowcaseControl ()
 Instantiates.
 
virtual ~CameraShowcaseControl ()
 Deletes.
 
void setMinDistance (float minDistance)
 Disallows the camera to move closer than minDistance to its origin. If the camera currently is closer than minDistance, it will be moved s.t. it will be minDistance units away from its origin.
 
void setMaxDistance (float maxDistance)
 Disallows the camera to move further away than maxDistance from its origin. If the camera currently is further away than maxDistance, it will be moved s.t. it will be maxDistance units away from its origin.
 
float minDistance () const
 Tells minimum allowed distance of camera to its origin.
 
float maxDistance () const
 Tells maximum allowed distance of camera to its origin.
 
virtual void setCamera (base::Spatial &) override
 Sets the node that is to be controlled by this instance.
 
virtual void rotateHorizontally (float radians) override
 Rotates the camera around the \(\left(0, 1, 0\right)^\mathrm T\) vector of its origin by radians.
 
virtual void rotateVertically (float radians) override
 Rotates the camera around its local \(\left(1, 0, 0\right)^\mathrm T\) vector, shifted to its origin, by radians.
 
virtual void moveAxially (float units) override
 Moves the camera along its local \(\left(0, 0, 1\right)^\mathrm T\) vector by units. The location is bounded by the current values for minDistance and maxDistance.
 
virtual void moveLaterally (float unitsX, float unitsY) override
 Moves the camera along its x-/y-axis. The parameters of this movement depend on the implementation.
 
- Public Member Functions inherited from LibCarna::base::CameraControl
virtual ~CameraControl ()
 Does nothing.
 

Static Public Attributes

static const float DEFAULT_MIN_DISTANCE
 Holds default minimum allowed distance of the camera to its origin.
 
static const float DEFAULT_MAX_DISTANCE
 Holds default maximum allowed distance of the camera to its origin.
 

Detailed Description

Implements base::CameraControl, rotates the camera around its parent node. The camera movement is bounded to the rail from its parent to its current location.

Todo:
Implement CameraShowcaseControl::moveLaterally.
Author
Leonid Kostrykin

Definition at line 48 of file CameraShowcaseControl.hpp.

Member Function Documentation

◆ moveAxially()

virtual void LibCarna::presets::CameraShowcaseControl::moveAxially ( float  units)
overridevirtual

Moves the camera along its local \(\left(0, 0, 1\right)^\mathrm T\) vector by units. The location is bounded by the current values for minDistance and maxDistance.

Implements LibCarna::base::CameraControl.

◆ moveLaterally()

virtual void LibCarna::presets::CameraShowcaseControl::moveLaterally ( float  distanceX,
float  distanceY 
)
overridevirtual

Moves the camera along its x-/y-axis. The parameters of this movement depend on the implementation.

Implements LibCarna::base::CameraControl.

◆ rotateHorizontally()

virtual void LibCarna::presets::CameraShowcaseControl::rotateHorizontally ( float  radians)
overridevirtual

Rotates the camera around the \(\left(0, 1, 0\right)^\mathrm T\) vector of its origin by radians.

Implements LibCarna::base::CameraControl.

◆ rotateVertically()

virtual void LibCarna::presets::CameraShowcaseControl::rotateVertically ( float  radians)
overridevirtual

Rotates the camera around its local \(\left(1, 0, 0\right)^\mathrm T\) vector, shifted to its origin, by radians.

Implements LibCarna::base::CameraControl.

◆ setCamera()

virtual void LibCarna::presets::CameraShowcaseControl::setCamera ( base::Spatial )
overridevirtual

Sets the node that is to be controlled by this instance.

Implements LibCarna::base::CameraControl.

◆ setMaxDistance()

void LibCarna::presets::CameraShowcaseControl::setMaxDistance ( float  maxDistance)

Disallows the camera to move further away than maxDistance from its origin. If the camera currently is further away than maxDistance, it will be moved s.t. it will be maxDistance units away from its origin.

Precondition
minDistance >= 0

◆ setMinDistance()

void LibCarna::presets::CameraShowcaseControl::setMinDistance ( float  minDistance)

Disallows the camera to move closer than minDistance to its origin. If the camera currently is closer than minDistance, it will be moved s.t. it will be minDistance units away from its origin.

Precondition
minDistance >= 0

Member Data Documentation

◆ DEFAULT_MAX_DISTANCE

const float LibCarna::presets::CameraShowcaseControl::DEFAULT_MAX_DISTANCE
static

Holds default maximum allowed distance of the camera to its origin.

Definition at line 66 of file CameraShowcaseControl.hpp.

◆ DEFAULT_MIN_DISTANCE

const float LibCarna::presets::CameraShowcaseControl::DEFAULT_MIN_DISTANCE
static

Holds default minimum allowed distance of the camera to its origin.

Definition at line 61 of file CameraShowcaseControl.hpp.


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