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

Controls projection matrices that induce frustum-shaped visible volume. More...

#include <PerspectiveControl.hpp>

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

Public Member Functions

 PerspectiveControl ()
 Instantiates.
 
virtual ~PerspectiveControl ()
 Deletes.
 
virtual void updateProjection (base::math::Matrix4f &perspectiveProjection) const override
 Creates perspectiveProjection matrix using base::math::frustum4f.
 
void setFovHorizontal (float radians)
 Sets the half angle between the left and the right frustum planes.
 
float fovHorizontal () const
 Tells the half angle between the left and the right frustum planes.
 
- Public Member Functions inherited from LibCarna::base::ProjectionControl
 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.
 
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_FOV_HORIZONTAL
 Holds the default half angle betwen the left and the right frustum planes.
 
- Static Public Attributes inherited from LibCarna::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 LibCarna::base::ProjectionControl
void invalidateProjection ()
 Denotes that an update is available.
 
void setProjectionValidated () const
 Denotes that no update is available.
 

Detailed Description

Controls projection matrices that induce frustum-shaped visible volume.

Author
Leonid Kostrykin

Definition at line 43 of file PerspectiveControl.hpp.

Member Function Documentation

◆ setFovHorizontal()

void LibCarna::presets::PerspectiveControl::setFovHorizontal ( float  radians)

Sets the half angle between the left and the right frustum planes.

Precondition
radians > 0

◆ updateProjection()

virtual void LibCarna::presets::PerspectiveControl::updateProjection ( base::math::Matrix4f perspectiveProjection) const
overridevirtual

Creates perspectiveProjection matrix using base::math::frustum4f.

Implements LibCarna::base::ProjectionControl.

Member Data Documentation

◆ DEFAULT_FOV_HORIZONTAL

const float LibCarna::presets::PerspectiveControl::DEFAULT_FOV_HORIZONTAL
static

Holds the default half angle betwen the left and the right frustum planes.

Definition at line 56 of file PerspectiveControl.hpp.


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