sead
Loading...
Searching...
No Matches
seadViewport.h
Go to the documentation of this file.
1#ifndef SEAD_VIEWPORT_H_
2#define SEAD_VIEWPORT_H_
3
4#include <gfx/seadGraphics.h>
5#include <gfx/seadFrameBuffer.h>
6
7namespace sead {
8
9class Viewport : public BoundBox2f
10{
11public:
14 Viewport(const BoundBox2f& box);
15 Viewport(const LogicalFrameBuffer& frame_buffer);
16
17 virtual ~Viewport()
18 {
19 }
20
21 void setByFrameBuffer(const LogicalFrameBuffer& frame_buffer);
22
23 void getOnFrameBufferPos(Vector2f* dst, const LogicalFrameBuffer& fb) const;
24 void getOnFrameBufferSize(Vector2f* dst, const LogicalFrameBuffer& fb) const;
25
26 void apply(const LogicalFrameBuffer& frame_buffer) const;
27 // ...
28
29protected:
31};
32#ifdef cafe
33static_assert(sizeof(Viewport) == 0x18, "sead::Viewport size mismatch");
34#endif // cafe
35
36} // namespace sead
37
38#endif // SEAD_VIEWPORT_H_
Definition seadGraphics.h:17
DevicePosture
Definition seadGraphics.h:20
Definition seadFrameBuffer.h:12
Definition seadViewport.h:10
Viewport(const LogicalFrameBuffer &frame_buffer)
Definition seadViewport.cpp:6
Graphics::DevicePosture mDevicePos
Definition seadViewport.h:30
void getOnFrameBufferPos(Vector2f *dst, const LogicalFrameBuffer &fb) const
Definition seadViewport.cpp:31
void getOnFrameBufferSize(Vector2f *dst, const LogicalFrameBuffer &fb) const
Definition seadViewport.cpp:80
Viewport(f32, f32, f32, f32)
void setByFrameBuffer(const LogicalFrameBuffer &frame_buffer)
Definition seadViewport.cpp:12
virtual ~Viewport()
Definition seadViewport.h:17
void apply(const LogicalFrameBuffer &frame_buffer) const
Definition seadViewport.cpp:104
Viewport(const BoundBox2f &box)
Definition seadAssert.h:44
Vector2< f32 > Vector2f
Definition seadVector.h:238
BoundBox2< f32 > BoundBox2f
Definition seadBoundBox.h:187