Graphics v0.0.0
A simple abstraction layer for the modern graphics APIs.
载入中...
搜索中...
未找到
Viewport.hpp
1// Copyright 2022 ShenMian
2// License(Apache-2.0)
3
4#pragma once
5
6#include <math/math.hpp>
7
12{
13 Viewport() = default;
14
15 Viewport(const Vector2f& size, float minDepth = 0.f, float maxDepth = 1.f)
16 : Viewport(0, 0, size.x(), size.y(), minDepth, maxDepth)
17 {
18 }
19
20 Viewport(const Vector2f& position, const Vector2f& size, float minDepth = 0.f, float maxDepth = 1.f)
21 : Viewport(position.x(), position.y(), size.x(), size.y(), minDepth, maxDepth)
22 {
23 }
24
25 Viewport(float x, float y, float width, float height, float minDepth = 0.f, float maxDepth = 1.f)
26 : x(x), y(y), width(width), height(height), minDepth(minDepth), maxDepth(maxDepth)
27 {
28 }
29
30 float x = 0.f;
31 float y = 0.f;
32 float width = 0.f;
33 float height = 0.f;
34 float minDepth = 0.f;
35 float maxDepth = 1.f;
36};
视口.
Definition: Viewport.hpp:12