NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
eggFrustum.h
1#pragma once
2
3#include <nw4r/g3d.h>
4
5namespace EGG {
6
7class Frustum {
8public:
9 enum Flag {
10 FLAG_DIRTY = BIT_FLAG(0),
11 FLAG_0x02 = BIT_FLAG(1),
12 FLAG_0x04 = BIT_FLAG(2),
13 FLAG_0x08 = BIT_FLAG(3),
14 FLAG_0x20 = BIT_FLAG(5),
15 FLAG_0x40 = BIT_FLAG(6),
16 };
17
18 enum ProjectionType {
19 PROJ_ORTHO,
20 PROJ_PERSP
21 };
22
23 enum CanvasMode {
24 CANVASMODE_0,
25 CANVASMODE_1,
26 };
27
28 ProjectionType mProjType;
29 CanvasMode mCanvasMode;
30 nw4r::math::VEC2 mSize;
31 f32 mFovY;
32 f32 mTanFovY;
33 f32 mNearZ;
34 f32 mFarZ;
35 nw4r::math::VEC2 mOffset;
36 nw4r::math::VEC3 mScale;
37 mutable u16 mFlags;
38
39 Frustum(ProjectionType projType, const nw4r::math::VEC2 &scale, f32 nearZ, f32 farZ, CanvasMode canvasMode);
40 Frustum(const Frustum &frustum);
41
42 virtual ~Frustum() {}
43 virtual void SetProjectionGX() const;
44 virtual void CopyToG3D(nw4r::g3d::Camera camera) const;
45 void ResetOrthographic(f32 top, f32 bottom, f32 left, f32 right, f32 nearZ, f32 farZ);
46};
47
48} // namespace EGG