Carna  Version 3.0.1
Public Member Functions | Static Public Attributes | List of all members
Carna::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.h>

+ Inheritance diagram for Carna::presets::CameraShowcaseControl:
+ Collaboration diagram for Carna::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. More...
 
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. More...
 
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 Carna::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
Date
22.2.15 - 17.3.15

Definition at line 45 of file CameraShowcaseControl.h.

Member Function Documentation

void Carna::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
void Carna::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

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