CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::Viewport Struct Referencefinal

#include <CeresEngine/RenderAPI/GPUGraphicsPipeline.hpp>

Public Member Functions

 Viewport () noexcept=default
 
 Viewport (const Viewport &) noexcept=default
 
Viewportoperator= (const Viewport &) noexcept=default
 
 Viewport (const float x, const float y, const float width, const float height) noexcept
 Viewport constructor with default depth range of [0, 1].
 
 Viewport (const float x, const float y, const float width, const float height, const float minDepth, const float maxDepth) noexcept
 Viewport constructor with parameters for all attributes.
 
 Viewport (const TOffset2< float > &offset, const TExtent2< float > &extent) noexcept
 Viewport constructor with offset, extent, and default depth range of [0, 1].
 
 Viewport (const TExtent2< float > &extent) noexcept
 Viewport constructor with offset, extent, and default depth range of [0, 1].
 
 Viewport (const TExtent2< UInt32 > &extent) noexcept
 Viewport constructor with offset, extent, and default depth range of [0, 1].
 
 Viewport (const TOffset2< float > &offset, const TExtent2< float > &extent, const float minDepth, const float maxDepth) noexcept
 Viewport constructor with offset, extent, and explicit depth range.
 

Static Public Member Functions

template<typename Processor >
static constexpr void reflect (Processor &&RTTI)
 Executes the given processor for every field of the struct.
 

Public Attributes

TOffset2< floatorigin
 The viewport origin. By default (0.0, 0.0).
 
TExtent2< floatextent
 The viewport size.
 
float minDepth = 0.0
 Minimum of the depth range.
 
float maxDepth = 1.0
 Maximum of the depth range.
 

Constructor & Destructor Documentation

◆ Viewport() [1/8]

CeresEngine::Viewport::Viewport ( )
defaultnoexcept

◆ Viewport() [2/8]

CeresEngine::Viewport::Viewport ( const Viewport )
defaultnoexcept

◆ Viewport() [3/8]

CeresEngine::Viewport::Viewport ( const float  x,
const float  y,
const float  width,
const float  height 
)
inlinenoexcept

Viewport constructor with default depth range of [0, 1].

◆ Viewport() [4/8]

CeresEngine::Viewport::Viewport ( const float  x,
const float  y,
const float  width,
const float  height,
const float  minDepth,
const float  maxDepth 
)
inlinenoexcept

Viewport constructor with parameters for all attributes.

◆ Viewport() [5/8]

CeresEngine::Viewport::Viewport ( const TOffset2< float > &  offset,
const TExtent2< float > &  extent 
)
inlinenoexcept

Viewport constructor with offset, extent, and default depth range of [0, 1].

◆ Viewport() [6/8]

CeresEngine::Viewport::Viewport ( const TExtent2< float > &  extent)
inlinenoexcept

Viewport constructor with offset, extent, and default depth range of [0, 1].

◆ Viewport() [7/8]

CeresEngine::Viewport::Viewport ( const TExtent2< UInt32 > &  extent)
inlinenoexcept

Viewport constructor with offset, extent, and default depth range of [0, 1].

◆ Viewport() [8/8]

CeresEngine::Viewport::Viewport ( const TOffset2< float > &  offset,
const TExtent2< float > &  extent,
const float  minDepth,
const float  maxDepth 
)
inlinenoexcept

Viewport constructor with offset, extent, and explicit depth range.

Member Function Documentation

◆ operator=()

Viewport & CeresEngine::Viewport::operator= ( const Viewport )
defaultnoexcept

◆ reflect()

template<typename Processor >
static constexpr void CeresEngine::Viewport::reflect ( Processor &&  RTTI)
inlinestaticconstexpr

Executes the given processor for every field of the struct.

Parameters
RTTIThe processor to be ran for every field.

Member Data Documentation

◆ extent

TExtent2<float> CeresEngine::Viewport::extent

The viewport size.

By Default (0.0, 0.0).

Remarks
Setting a viewport of negative width results in undefined behavior.

◆ maxDepth

float CeresEngine::Viewport::maxDepth = 1.0

Maximum of the depth range.

Must be in the range [0, 1]. By default 1.0.

Remarks
Reverse mappings such as minDepth=1 and maxDepth=0 are also valid.

◆ minDepth

float CeresEngine::Viewport::minDepth = 0.0

Minimum of the depth range.

Must be in the range [0, 1]. By default 0.0.

Remarks
Reverse mappings such as minDepth=1 and maxDepth=0 are also valid.

◆ origin

TOffset2<float> CeresEngine::Viewport::origin

The viewport origin. By default (0.0, 0.0).


The documentation for this struct was generated from the following file: