SGCT
master (487fac4)
Simple Graphics Cluster Toolkit
Toggle main menu visibility
Loading...
Searching...
No Matches
projection.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__PROJECTION__H__
10
#define __SGCT__PROJECTION__H__
11
12
#include <sgct/sgctexports.h>
13
14
#include <
sgct/math.h
>
15
16
namespace
sgct
{
17
18
class
ProjectionPlane
;
19
23
class
SGCT_EXPORT
Projection
{
24
public
:
25
void
calculateProjection
(
vec3
base,
const
ProjectionPlane
& proj,
float
nearClip,
26
float
farClip,
vec3
offset =
vec3
{ 0.f, 0.f, 0.f });
27
28
const
mat4
&
viewProjectionMatrix
()
const
;
29
const
mat4
&
viewMatrix
()
const
;
30
const
mat4
&
projectionMatrix
()
const
;
31
32
private
:
33
struct
Frustum {
34
float
left = -1.f;
35
float
right = 1.f;
36
float
bottom = -1.f;
37
float
top = 1.f;
38
float
nearPlane = 0.1f;
39
float
farPlane = 100.f;
40
};
41
42
mat4
_viewMatrix =
mat4
(1.f);
43
mat4
_viewProjectionMatrix =
mat4
(1.f);
44
mat4
_projectionMatrix =
mat4
(1.f);
45
46
Frustum _frustum;
47
};
48
49
}
// namespace sgct
50
51
#endif
// __SGCT__PROJECTION__H__
sgct::Projection
This class holds and manages 3D projections.
Definition
projection.h:23
sgct::Projection::calculateProjection
void calculateProjection(vec3 base, const ProjectionPlane &proj, float nearClip, float farClip, vec3 offset=vec3{ 0.f, 0.f, 0.f })
sgct::Projection::projectionMatrix
const mat4 & projectionMatrix() const
sgct::Projection::viewProjectionMatrix
const mat4 & viewProjectionMatrix() const
sgct::Projection::viewMatrix
const mat4 & viewMatrix() const
sgct::ProjectionPlane
This class holds and manages the 3D projection plane.
Definition
projectionplane.h:21
math.h
sgct
Definition
actions.h:16
sgct::mat4
Definition
math.h:89
sgct::vec3
Definition
math.h:56
sgct
projection.h
Generated by
1.18.0