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