SLProject  4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
SLFrustum.h
Go to the documentation of this file.
1 /**
2  * \file SLFrustum.h
3  * \authors Luc Girod
4  * \date Summer 2021
5  * \copyright http://opensource.org/licenses/GPL-3.0
6  * \remarks Please use clangformat to format the code. See more code style on
7  * https://github.com/cpvrlab/SLProject4/wiki/SLProject-Coding-Style
8 */
9 
10 #ifndef SLFRUSTUM
11 #define SLFRUSTUM
12 
13 //-----------------------------------------------------------------------------
14 //! Matrix to 6 frustum plane conversion functions
15 class SLFrustum
16 {
17 public:
18  static void viewToFrustumPlanes(SLPlane* planes,
19  const SLMat4f& projectionMat,
20  const SLMat4f& viewMat);
21  static void viewToFrustumPlanes(SLPlane* planes,
22  const SLMat4f& A);
23  static void getPointsInViewSpace(SLVec3f* points,
24  float fovV,
25  float ratio,
26  float clipNear,
27  float clipFar);
28 };
29 //-----------------------------------------------------------------------------
30 #endif
Matrix to 6 frustum plane conversion functions.
Definition: SLFrustum.h:16
static void viewToFrustumPlanes(SLPlane *planes, const SLMat4f &projectionMat, const SLMat4f &viewMat)
Definition: SLFrustum.cpp:24
static void getPointsInViewSpace(SLVec3f *points, float fovV, float ratio, float clipNear, float clipFar)
Returns frustum points in view space.
Definition: SLFrustum.cpp:73
Defines a plane in 3D space with the equation ax + by + cy + d = 0.
Definition: SLPlane.h:25