-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcamera_3d.hpp
More file actions
44 lines (33 loc) · 1 KB
/
camera_3d.hpp
File metadata and controls
44 lines (33 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef CAMERA_3D_H
#define CAMERA_3D_H
#include <Nostalgia/things/thinkers/3d/visual_3d.hpp>
#include <Nostalgia/rendering/environment.hpp>
class Camera3D : public Actor3D
{
public:
SET_SUPER(Actor3D)
SET_TYPEID(ThingType::Camera3D)
READY_OVERRIDE
SET_VARIABLES_OVERRIDE
GET_VARIABLES_OVERRIDE
float mFOV{75.0f},
mViewCutoffNear{0.01f},
mViewCutoffFar{1000.0f};
Environment mEnvironment{};
virtual void DrawBackground() const;
virtual void Draw(Shared<Visual3D>) const;
virtual ID ViewportID() const;
virtual bool Current() const;
virtual Error SetCurrent(bool);
virtual BitMask LayersMask() const;
virtual void SetLayersMask(BitMask inRenderLayersMask);
glm::mat4 ViewMatrix() const;
glm::mat4 ProjectionMatrix() const;
protected:
bool mInitCurrent{true};
ID mViewportID{};
BitMask mLayersMask{};
virtual void OnAncestorRemoved(Relative) override;
virtual void OnAncestorAdded(Relative) override;
};
#endif // CAMERA_3D_H