SGCT
master (487fac4)
Simple Graphics Cluster Toolkit
Toggle main menu visibility
Loading...
Searching...
No Matches
cylindrical.h
Go to the documentation of this file.
1
/*****************************************************************************************
2
* SGCT *
3
* Simple Graphics Cluster Toolkit *
4
* *
5
* Copyright (c) 2012-2026 *
6
* For conditions of distribution and use, see copyright notice in LICENSE.md *
7
****************************************************************************************/
8
9
#ifndef __SGCT__CYLINDRICAL__H__
10
#define __SGCT__CYLINDRICAL__H__
11
12
#include <sgct/sgctexports.h>
13
#include <
sgct/projection/nonlinearprojection.h
>
14
15
#include <
sgct/math.h
>
16
#include <
sgct/shaderprogram.h
>
17
18
namespace
sgct
{
19
20
namespace
config
{
struct
CylindricalProjection
; }
21
class
BaseViewport
;
22
class
User
;
23
class
Window
;
24
25
class
SGCT_EXPORT
CylindricalProjection
final :
public
NonLinearProjection
{
26
public
:
27
CylindricalProjection
(
const
config::CylindricalProjection
&
config
,
28
const
Window
& parent,
User
& user);
29
~CylindricalProjection
() final;
30
31
void
render
(const
BaseViewport
& viewport,
FrustumMode
mode) const override;
32
33
void
renderCubemap
(
FrustumMode
frustumMode) const override;
34
35
void
update
(const
vec2
& size) const override;
36
37
void
setRotation
(
float
rotation);
38
void
setHeightOffset
(
float
heightOffset);
39
void
setRadius
(
float
radius);
40
41
private:
42
void
initVBO() override;
43
void
initViewports() override;
44
void
initShaders() override;
45
46
float
_rotation;
47
float
_heightOffset;
48
float
_radius;
49
50
struct {
51
ShaderProgram
program;
52
int
cubemap = -1;
53
int
rotation = -1;
54
int
heightOffset = -1;
55
} _shader;
56
57
unsigned
int
_vao = 0;
58
unsigned
int
_vbo = 0;
59
};
60
61
}
// namespace sgct
62
63
#endif
// __SGCT__CYLINDRICAL__H__
sgct::BaseViewport
This class holds and manages viewportdata and calculates frustums.
Definition
baseviewport.h:27
sgct::CylindricalProjection::render
void render(const BaseViewport &viewport, FrustumMode mode) const override
sgct::CylindricalProjection::setRadius
void setRadius(float radius)
sgct::CylindricalProjection::update
void update(const vec2 &size) const override
sgct::CylindricalProjection::setRotation
void setRotation(float rotation)
sgct::CylindricalProjection::setHeightOffset
void setHeightOffset(float heightOffset)
sgct::CylindricalProjection::CylindricalProjection
CylindricalProjection(const config::CylindricalProjection &config, const Window &parent, User &user)
sgct::CylindricalProjection::~CylindricalProjection
~CylindricalProjection() final
sgct::CylindricalProjection::renderCubemap
void renderCubemap(FrustumMode frustumMode) const override
sgct::NonLinearProjection::NonLinearProjection
NonLinearProjection(const Window &parent)
sgct::ShaderProgram
Class for handling compiling, linking and using shader programs.
Definition
shaderprogram.h:24
sgct::User
Helper class for setting user variables.
Definition
user.h:24
sgct::Window
Definition
window.h:46
math.h
sgct::config
Definition
clustermanager.h:22
sgct
Definition
actions.h:16
sgct::FrustumMode
FrustumMode
Definition
definitions.h:23
nonlinearprojection.h
shaderprogram.h
sgct::config::CylindricalProjection
Definition
config.h:183
sgct::vec2
Definition
math.h:47
sgct
projection
cylindrical.h
Generated by
1.18.0