From e1bf93caa96ef8b29cc31863e2d269be3b48192f Mon Sep 17 00:00:00 2001 From: Danilo Date: Mon, 5 Aug 2024 17:58:05 -0300 Subject: [PATCH] =?UTF-8?q?Coment=C3=A1rios=20em=20Viewport?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- inc/xna/graphics/viewport.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/inc/xna/graphics/viewport.hpp b/inc/xna/graphics/viewport.hpp index 882eb0a..43dd290 100644 --- a/inc/xna/graphics/viewport.hpp +++ b/inc/xna/graphics/viewport.hpp @@ -4,12 +4,19 @@ #include "../common/numerics.hpp" namespace xna { + //Defines the window dimensions of a render-target surface onto which a 3D volume projects. struct Viewport { + //Gets or sets the pixel coordinate of the upper-left corner of the viewport on the render-target surface. float X{ 0 }; + //Gets or sets the pixel coordinate of the upper-left corner of the viewport on the render-target surface. float Y{ 0 }; + //Gets or sets the width dimension of the viewport on the render-target surface, in pixels. float Width{ 0 }; + //Gets or sets the height dimension of the viewport on the render-target surface, in pixels. float Height{ 0 }; + //Gets or sets the minimum depth of the clip volume. float MinDetph{ 0 }; + //Gets or sets the maximum depth of the clip volume. float MaxDepth{ 1.0F }; constexpr Viewport() = default; @@ -26,6 +33,7 @@ namespace xna { && MaxDepth == other.MaxDepth; } + //Gets the size of this resource. constexpr Rectangle Bounds() const { return { static_cast(X),