LibCarna Version 3.4.0
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
LibCarna::base::ProjectionControl Class Referenceabstract

Controls projection matrices. More...

#include <ProjectionControl.hpp>

+ Inheritance diagram for LibCarna::base::ProjectionControl:

Public Member Functions

 ProjectionControl ()
 Instantiates.
 
virtual ~ProjectionControl ()
 Deletes.
 
void setViewportWidth (unsigned int width)
 Sets the width of the viewport updateProjection should create projection matrices for.
 
void setViewportHeight (unsigned int height)
 Sets the height of the viewport updateProjection should create projection matrices for.
 
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.
 
void setMaximumVisibleDistance (float maximumVisibleDistance)
 Sets far clipping plane distance that should be used by updateProjection.
 
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.
 
virtual void updateProjection (math::Matrix4f &projectionMatrix) const =0
 Creates projectionMatrix based on previously set parameters.
 
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.
 

Static Public Attributes

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.
 

Protected Member Functions

void invalidateProjection ()
 Denotes that an update is available.
 
void setProjectionValidated () const
 Denotes that no update is available.
 

Detailed Description

Controls projection matrices.

Author
Leonid Kostrykin

Definition at line 44 of file ProjectionControl.hpp.

Member Function Documentation

◆ setMaximumVisibleDistance()

void LibCarna::base::ProjectionControl::setMaximumVisibleDistance ( float  maximumVisibleDistance)

Sets far clipping plane distance that should be used by updateProjection.

Precondition
maximumVisibleDistance > 0

◆ setMinimumVisibleDistance()

void LibCarna::base::ProjectionControl::setMinimumVisibleDistance ( float  minimumVisibleDistance)

Sets near clipping plane distance that should be used by updateProjection.

Precondition
minimumVisibleDistance >= 0

◆ setViewportHeight()

void LibCarna::base::ProjectionControl::setViewportHeight ( unsigned int  height)

Sets the height of the viewport updateProjection should create projection matrices for.

Precondition
height > 0

◆ setViewportWidth()

void LibCarna::base::ProjectionControl::setViewportWidth ( unsigned int  width)

Sets the width of the viewport updateProjection should create projection matrices for.

Precondition
width > 0

◆ updateProjection()

virtual void LibCarna::base::ProjectionControl::updateProjection ( math::Matrix4f projectionMatrix) const
pure virtual

Creates projectionMatrix based on previously set parameters.

Implemented in LibCarna::presets::OrthogonalControl, and LibCarna::presets::PerspectiveControl.

Member Data Documentation

◆ DEFAULT_MAXIMUM_VISIBLE_DISTANCE

const float LibCarna::base::ProjectionControl::DEFAULT_MAXIMUM_VISIBLE_DISTANCE
static

Holds default far clipping plane distance that should be used by updateProjection.

Definition at line 64 of file ProjectionControl.hpp.

◆ DEFAULT_MINIMUM_VISIBLE_DISTANCE

const float LibCarna::base::ProjectionControl::DEFAULT_MINIMUM_VISIBLE_DISTANCE
static

Holds default near clipping plane distance that should be used by updateProjection.

Definition at line 58 of file ProjectionControl.hpp.


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