Carna  Version 3.3.2
Public Member Functions | Static Public Attributes | List of all members
Carna::presets::OrthogonalControl Class Reference

Controls orthogonal projection matrices, that induce box-shaped visible volume, and base::Camera objects that use such projections. More...

#include <OrthogonalControl.h>

+ Inheritance diagram for Carna::presets::OrthogonalControl:
+ Collaboration diagram for Carna::presets::OrthogonalControl:

Public Member Functions

 OrthogonalControl (base::CameraControl *cc)
 Instantiates. More...
 
virtual ~OrthogonalControl ()
 Deletes.
 
void setZoomStrength (float zoomStrength)
 Sets the \(\frac{\text{zoom level}}{\text{moved units}}\) factor.
 
float zoomStrength () const
 Tells the \(\frac{\text{zoom level}}{\text{moved units}}\) factor.
 
void setRotationEnabled (bool isRotationEnabled)
 Enables and disables rotateHorizontally and rotateVertically.
 
bool isRotationEnabled () const
 Tells whether rotateHorizontally and rotateVertically are enabled.
 
float zoomFactor () const
 Tells current zoom factor.
 
virtual void updateProjection (base::math::Matrix4f &orthogonalProjection) const override
 Creates orthogonalProjection matrix using base::math::ortho4f.
 
virtual void setCamera (base::Spatial &camera) override
 Sets the camera that this object should control. Also sets the orthogonal projection hint if camera is from base::Camera class.
 
virtual void rotateHorizontally (float radians) override
 Delegates to the base::CameraControl implementation that was supplied to the constructor.
 
virtual void rotateVertically (float radians) override
 Delegates to the base::CameraControl implementation that was supplied to the constructor.
 
virtual void moveAxially (float units) override
 Updates the result updateProjection produces.
 
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::ProjectionControl
 ProjectionControl ()
 Instantiates.
 
virtual ~ProjectionControl ()
 Deletes.
 
void setViewportWidth (unsigned int width)
 Sets the width of the viewport updateProjection should create projection matrices for. More...
 
void setViewportHeight (unsigned int height)
 Sets the height of the viewport updateProjection should create projection matrices for. More...
 
unsigned int viewportWidth () const
 Tells the width of the viewport updateProjection should create projection matrices for.
 
unsigned int viewportHeight () const
 Tells the height of the viewport updateProjection should create projection matrices for.
 
void setMinimumVisibleDistance (float minimumVisibleDistance)
 Sets near clipping plane distance that should be used by updateProjection. More...
 
void setMaximumVisibleDistance (float maximumVisibleDistance)
 Sets far clipping plane distance that should be used by updateProjection. More...
 
float minimumVisibleDistance () const
 Tells near clipping plane distance that is used by updateProjection.
 
float maximumVisibleDistance () const
 Tells far clipping plane distance that is used by updateProjection.
 
bool isUpdateAvailable () const
 Tells true when probably a new projection matrix is available and false when updateProjection is likely to return the same result as the last time.
 
- Public Member Functions inherited from Carna::base::CameraControl
virtual ~CameraControl ()
 Does nothing.
 

Static Public Attributes

static const float DEFAULT_ZOOM_STRENGTH
 Default \(\frac{\text{zoom level}}{\text{moved units}}\) factor.
 
- Static Public Attributes inherited from Carna::base::ProjectionControl
static const float DEFAULT_MINIMUM_VISIBLE_DISTANCE
 Holds default near clipping plane distance that should be used by updateProjection.
 
static const float DEFAULT_MAXIMUM_VISIBLE_DISTANCE
 Holds default far clipping plane distance that should be used by updateProjection.
 

Additional Inherited Members

- Protected Member Functions inherited from Carna::base::ProjectionControl
void invalidateProjection ()
 Denotes that an update is available.
 
void setProjectionValidated () const
 Denotes that no update is available.
 

Detailed Description

Controls orthogonal projection matrices, that induce box-shaped visible volume, and base::Camera objects that use such projections.

The base::CameraControl interface delegates rotations and lateral movement to an arbitrary implementation that is supplied to the constructor, but overrides the axial movement s.t. it is realized as zooming through adjustment of the projection matrix.

Author
Leonid Kostrykin
Date
5.4.15

Definition at line 47 of file OrthogonalControl.h.

Constructor & Destructor Documentation

◆ OrthogonalControl()

Carna::presets::OrthogonalControl::OrthogonalControl ( base::CameraControl cc)
explicit

Instantiates.

Precondition
cc != nullptr

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