![]() |
SGCT master (487fac4)
Simple Graphics Cluster Toolkit
|
This class manages and renders non linear fisheye projections. More...
#include <sgct/projection/fisheye.h>


Public Types | |
| enum class | FisheyeMethod { FourFaceCube = 0 , FiveFaceCube , SixFaceCube } |
| Public Types inherited from sgct::NonLinearProjection | |
| enum class | InterpolationMode : uint8_t { Linear , Cubic } |
Public Member Functions | |
| FisheyeProjection (const config::FisheyeProjection &config, const Window &parent, User &user) | |
| ~FisheyeProjection () final | |
| void | update (const vec2 &size) const override |
| Update projection when aspect ratio changes for the viewport. | |
| void | render (const BaseViewport &viewport, FrustumMode frustumMode) const override |
| Render the non-linear projection to currently bounded FBO. | |
| void | renderCubemap (FrustumMode frustumMode) const override |
| Render the enabled faces of the cubemap. | |
| void | setDomeDiameter (float diameter) |
| Set the dome diameter used in the fisheye renderer (used for the viewplane distance calculations). | |
| void | setTilt (float angle) |
| Set the fisheye/dome tilt angle used in the fisheye renderer. | |
| void | setFOV (float angle) |
| Set the fisheye/dome field-of-view angle used in the fisheye renderer. | |
| void | setCropFactors (float left, float right, float bottom, float top) |
| Set the fisheye crop values. | |
| void | setOffset (vec3 offset) const |
| Set fisheye offset to render offaxis. | |
| void | setBaseOffset (vec3 offset) |
| Set fisheye base offset to render offaxis. | |
| void | setIgnoreAspectRatio (bool state) |
| Ignore the framebuffer aspect ratio to allow non-circular fisheye. | |
| void | setKeepAspectRatio (bool state) |
| Public Member Functions inherited from sgct::NonLinearProjection | |
| NonLinearProjection (const Window &parent) | |
| virtual | ~NonLinearProjection () |
| virtual void | initialize (unsigned int internalFormat, int nSamples) |
| Initialize the non-linear projection. | |
| virtual void | updateFrustums (FrustumMode mode, float nearClip, float farClip) |
| void | setCubemapResolution (int resolution) |
| Set the resolution of the cubemap faces. | |
| void | setInterpolationMode (InterpolationMode im) |
| Set the interpolation mode. | |
| void | setUseDepthTransformation (bool state) |
| Set if depth should be re-calculated to match the non-linear projection. | |
| void | setStereo (bool state) |
| Set if stereoscopic rendering will be enabled. | |
| virtual void | setUser (User &user) |
| ivec2 | cubemapResolution () const |
Additional Inherited Members | |
| Protected Member Functions inherited from sgct::NonLinearProjection | |
| virtual void | initTextures (unsigned int internalFormat) |
| virtual void | initFBO (unsigned int internalFormat, int nSamples) |
| void | setupViewport (const BaseViewport &vp) const |
| void | generateMap (unsigned int &texture, unsigned int internalFormat) |
| void | generateCubeMap (unsigned int &texture, unsigned int internalFormat) |
| void | attachTextures (int face) const |
| void | blitCubeFace (int face) const |
| void | renderCubeFace (const BaseViewport &vp, int idx, FrustumMode mode) const |
| Protected Attributes inherited from sgct::NonLinearProjection | |
| struct sgct::NonLinearProjection:: { ... } | _textures |
| struct sgct::NonLinearProjection:: { ... } | _subViewports |
| InterpolationMode | _interpolationMode = InterpolationMode::Linear |
| FrustumMode | _preferedMonoFrustumMode = FrustumMode::Mono |
| bool | _useDepthTransformation = false |
| bool | _isStereo = false |
| ivec2 | _cubemapResolution = ivec2(512, 512) |
| vec4 | _clearColor = vec4(0.3f, 0.3f, 0.3f, 1.f) |
| std::unique_ptr< OffScreenBuffer > | _cubeMapFbo |
This class manages and renders non linear fisheye projections.
|
strong |
| sgct::FisheyeProjection::FisheyeProjection | ( | const config::FisheyeProjection & | config, |
| const Window & | parent, | ||
| User & | user ) |
|
final |
|
overridevirtual |
Render the non-linear projection to currently bounded FBO.
Implements sgct::NonLinearProjection.
|
overridevirtual |
Render the enabled faces of the cubemap.
Implements sgct::NonLinearProjection.
| void sgct::FisheyeProjection::setBaseOffset | ( | vec3 | offset | ) |
Set fisheye base offset to render offaxis.
Length of vector must be smaller then 1. Base of fisheye is the XY-plane. The base offset will be added to the offset specified by setFisheyeOffset. These values are set from the configuration.
| void sgct::FisheyeProjection::setCropFactors | ( | float | left, |
| float | right, | ||
| float | bottom, | ||
| float | top ) |
Set the fisheye crop values.
Theese values are used when rendering content for a single projector dome. The elumenati geodome has usually a 4:3 SXGA+ (1400x1050) projector and the fisheye is cropped 25% (350 pixels) at the top.
| void sgct::FisheyeProjection::setDomeDiameter | ( | float | diameter | ) |
Set the dome diameter used in the fisheye renderer (used for the viewplane distance calculations).
| diameter | Diameter of the dome diameter in meters |
| void sgct::FisheyeProjection::setFOV | ( | float | angle | ) |
Set the fisheye/dome field-of-view angle used in the fisheye renderer.
| angle | The FOV angle in degrees |
| void sgct::FisheyeProjection::setIgnoreAspectRatio | ( | bool | state | ) |
Ignore the framebuffer aspect ratio to allow non-circular fisheye.
This is useful for spherical mirror projections.
| void sgct::FisheyeProjection::setKeepAspectRatio | ( | bool | state | ) |
| void sgct::FisheyeProjection::setOffset | ( | vec3 | offset | ) | const |
Set fisheye offset to render offaxis.
Length of vector must be smaller then 1. Base of fisheye is the XY-plane. This function is normally used in fisheye stereo rendering.
| void sgct::FisheyeProjection::setTilt | ( | float | angle | ) |
Set the fisheye/dome tilt angle used in the fisheye renderer.
The tilt angle is from the horizontal.
| angle | The tilt angle in degrees |
|
overridevirtual |
Update projection when aspect ratio changes for the viewport.
Implements sgct::NonLinearProjection.