SGCT master (487fac4)
Simple Graphics Cluster Toolkit
Loading...
Searching...
No Matches
sgct::CubemapProjection Class Referencefinal

This class manages and renders non-linear fisheye projections. More...

#include <sgct/projection/cubemap.h>

Inheritance diagram for sgct::CubemapProjection:
Collaboration diagram for sgct::CubemapProjection:

Public Member Functions

 CubemapProjection (const config::CubemapProjection &config, const Window &parent, User &user)
 ~CubemapProjection () override
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 setSpoutRigOrientation (vec3 orientation)
 Render the enabled faces of the cubemap.
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

Public Types inherited from sgct::NonLinearProjection
enum class  InterpolationMode : uint8_t { Linear , Cubic }
Protected Member Functions inherited from sgct::NonLinearProjection
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

Detailed Description

This class manages and renders non-linear fisheye projections.

Constructor & Destructor Documentation

◆ CubemapProjection()

sgct::CubemapProjection::CubemapProjection ( const config::CubemapProjection & config,
const Window & parent,
User & user )

◆ ~CubemapProjection()

sgct::CubemapProjection::~CubemapProjection ( )
override

Member Function Documentation

◆ render()

void sgct::CubemapProjection::render ( const BaseViewport & viewport,
FrustumMode frustumMode ) const
overridevirtual

Render the non linear projection to currently bounded FBO.

Implements sgct::NonLinearProjection.

◆ setSpoutRigOrientation()

void sgct::CubemapProjection::setSpoutRigOrientation ( vec3 orientation)

Render the enabled faces of the cubemap.

◆ update()

void sgct::CubemapProjection::update ( const vec2 & size) const
overridevirtual

Update projection when aspect ratio changes for the viewport.

Implements sgct::NonLinearProjection.


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