LeviLamina
Loading...
Searching...
No Matches
Frustum.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated forward declare list
6// clang-format off
7struct FrustumEdges;
8// clang-format on
9
10class Frustum {
11public:
12 // Frustum inner types define
13 enum class FrustumSide : uchar {
14 Right = 0,
15 Left = 1,
16 Bottom = 2,
17 Top = 3,
18 Back = 4,
19 Front = 5,
20 NumFrustumPlanes = 6,
21 };
22
23 enum class Plane : uchar {
24 PlaneNormalX = 0,
25 PlaneNormalY = 1,
26 PlaneNormalZ = 2,
27 PlaneToOriginDistance = 3,
28 };
29
30public:
31 // member variables
32 // NOLINTBEGIN
36 // NOLINTEND
37
38#ifdef LL_PLAT_S
39public:
40 // prevent constructor by default
41 Frustum& operator=(Frustum const&);
42 Frustum(Frustum const&);
43 Frustum();
44
45#else // LL_PLAT_C
46public:
47 // prevent constructor by default
48 Frustum& operator=(Frustum const&);
49 Frustum(Frustum const&);
50
51#endif
52public:
53 // member functions
54 // NOLINTBEGIN
55#ifdef LL_PLAT_C
56 MCNAPI Frustum();
57
58 MCNAPI void calculateFrustum(::glm::mat4x4 const& mvp);
59
60 MCNAPI bool cubeInFrustum(::glm::vec3 const& min, ::glm::vec3 const& max) const;
61
62 MCNAPI ::FrustumEdges const& getNearClippingPlaneEdges() const;
63
64 MCNAPI bool pointInFrustum(::glm::vec3 const& point) const;
65
66 MCNAPI void setupFrustum(::Frustum::FrustumSide side, ::glm::vec3 const& normals, float distance);
67#endif
68 // NOLINTEND
69
70public:
71 // static functions
72 // NOLINTBEGIN
73#ifdef LL_PLAT_C
74 MCNAPI static ::Frustum getFrustum(::glm::mat4x4 const& mvp);
75
76 MCNAPI static ::Frustum
77 getFrustum(::glm::mat4x4 const& projection, ::glm::mat4x4 const& view, ::glm::mat4x4 const& world);
78#endif
79 // NOLINTEND
80
81public:
82 // constructor thunks
83 // NOLINTBEGIN
84#ifdef LL_PLAT_C
85 MCNAPI void* $ctor();
86#endif
87 // NOLINTEND
88};
Definition FrustumEdges.h:5
Definition Alias.h:14