![]() |
SGCT master (487fac4)
Simple Graphics Cluster Toolkit
|
This class holds and manages viewportdata and calculates frustums. More...
#include <sgct/baseviewport.h>


Public Member Functions | |
| BaseViewport (const Window &parent, FrustumMode eye=FrustumMode::Mono) | |
| virtual | ~BaseViewport () |
| void | setupViewport (FrustumMode frustum) const |
| const Projection & | projection (FrustumMode frustumMode) const |
| ProjectionPlane & | projectionPlane () |
| virtual void | calculateFrustum (FrustumMode mode, float nearClip, float farClip) |
| void | calculateNonLinearFrustum (FrustumMode mode, float nearClip, float farClip) |
| Make projection symmetric relative to user. | |
| void | setViewPlaneCoordsUsingFOVs (float up, float down, float left, float right, quat rot, float dist=10.f) |
| void | updateFovToMatchAspectRatio (float oldRatio, float newRatio) |
| void | setEnabled (bool state) |
| bool | isEnabled () const |
| void | setPosition (vec2 position) |
| const vec2 & | position () const |
| void | setSize (vec2 size) |
| const vec2 & | size () const |
| void | setUser (User &user) |
| User & | user () const |
| FrustumMode | eye () const |
| void | setHorizontalFieldOfView (float hFov) |
| float | horizontalFieldOfViewDegrees () const |
| const Window & | window () const |
Protected Attributes | |
| const Window & | _parent |
| Projection | _monoProj |
| Projection | _stereoLeftProj |
| Projection | _stereoRightProj |
| ProjectionPlane | _projPlane |
| bool | _isEnabled = true |
| const FrustumMode | _eye |
| vec2 | _position = vec2{ 0.f, 0.f } |
| vec2 | _size = vec2{ 1.f, 1.f } |
| User * | _user |
| struct sgct::BaseViewport:: { ... } | _viewPlane |
| quat | _rotation = quat{ 0.f, 0.f, 0.f, 1.f } |
This class holds and manages viewportdata and calculates frustums.
|
explicit |
|
virtual |
|
virtual |
Reimplemented in sgct::Viewport.
| void sgct::BaseViewport::calculateNonLinearFrustum | ( | FrustumMode | mode, |
| float | nearClip, | ||
| float | farClip ) |
Make projection symmetric relative to user.
| FrustumMode sgct::BaseViewport::eye | ( | ) | const |
| float sgct::BaseViewport::horizontalFieldOfViewDegrees | ( | ) | const |
| bool sgct::BaseViewport::isEnabled | ( | ) | const |
| const vec2 & sgct::BaseViewport::position | ( | ) | const |
| const Projection & sgct::BaseViewport::projection | ( | FrustumMode | frustumMode | ) | const |
| ProjectionPlane & sgct::BaseViewport::projectionPlane | ( | ) |
| void sgct::BaseViewport::setEnabled | ( | bool | state | ) |
| void sgct::BaseViewport::setHorizontalFieldOfView | ( | float | hFov | ) |
| void sgct::BaseViewport::setPosition | ( | vec2 | position | ) |
| void sgct::BaseViewport::setSize | ( | vec2 | size | ) |
| void sgct::BaseViewport::setupViewport | ( | FrustumMode | frustum | ) | const |
| void sgct::BaseViewport::setUser | ( | User & | user | ) |
| void sgct::BaseViewport::setViewPlaneCoordsUsingFOVs | ( | float | up, |
| float | down, | ||
| float | left, | ||
| float | right, | ||
| quat | rot, | ||
| float | dist = 10.f ) |
| const vec2 & sgct::BaseViewport::size | ( | ) | const |
| void sgct::BaseViewport::updateFovToMatchAspectRatio | ( | float | oldRatio, |
| float | newRatio ) |
| User & sgct::BaseViewport::user | ( | ) | const |
| const Window & sgct::BaseViewport::window | ( | ) | const |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| struct { ... } sgct::BaseViewport::_viewPlane |