LiteFX 0.4.1.2025
Computer Graphics Engine
Loading...
Searching...
No Matches
LiteFX::Rendering::Viewport Class Reference

Implements a viewport. More...

#include <rendering_api.hpp>

Inherits LiteFX::Rendering::IViewport.

Classes

class  ViewportImpl
 

Public Member Functions

 Viewport (const RectF &clientRect={ }, Float minDepth=0.f, Float maxDepth=1.f) noexcept
 Initializes a new viewport.
 
 Viewport (const Viewport &_other)
 Creates a copy of a viewport.
 
 Viewport (Viewport &&_other) noexcept
 Takes over another instance of a viewport.
 
Viewportoperator= (const Viewport &_other)
 Assigns a viewport by copying it.
 
Viewportoperator= (Viewport &&_other) noexcept
 Assigns a viewport by taking it over.
 
 ~Viewport () noexcept override
 Releases the render target instance.
 
RectF getRectangle () const noexcept override
 Gets the rectangle that defines the dimensions of the viewport.
Returns
The rectangle that defines the dimensions of the viewport.

 
void setRectangle (const RectF &rectangle) noexcept override
 Sets the rectangle that defines the dimensions of the viewport.
Parameters
rectangleThe rectangle that defines the dimensions of the viewport.

 
Float getMinDepth () const noexcept override
 Gets the minimum depth of the viewport.
Returns
The minimum depth of the viewport.

 
void setMinDepth (Float depth) const noexcept override
 Sets the minimum depth of the viewport.
Parameters
depthThe minimum depth of the viewport.

 
Float getMaxDepth () const noexcept override
 Gets the maximum depth of the viewport.
Returns
The maximum depth of the viewport.

 
void setMaxDepth (Float depth) const noexcept override
 Sets the maximum depth of the viewport.
Parameters
depthThe maximum depth of the viewport.

 
- Public Member Functions inherited from LiteFX::Rendering::IViewport
virtual ~IViewport () noexcept=default
 

Additional Inherited Members

- Protected Member Functions inherited from LiteFX::Rendering::IViewport
 IViewport () noexcept=default
 
 IViewport (const IViewport &)=default
 
 IViewport (IViewport &&) noexcept=default
 
IViewportoperator= (const IViewport &)=default
 
IViewportoperator= (IViewport &&) noexcept=default
 

Detailed Description

Implements a viewport.

Constructor & Destructor Documentation

◆ Viewport() [1/3]

Viewport::Viewport ( const RectF & clientRect = { },
Float minDepth = 0.f,
Float maxDepth = 1.f )
explicitnoexcept

Initializes a new viewport.

Parameters
clientRectThe rectangle that defines the dimensions of the viewport.
minDepthThe minimum depth of the viewport.
maxDepthThe maximum depth of the viewport.

◆ Viewport() [2/3]

LiteFX::Rendering::Viewport::Viewport ( const Viewport & _other)

Creates a copy of a viewport.

Parameters
_otherThe viewport instance to copy.

◆ Viewport() [3/3]

LiteFX::Rendering::Viewport::Viewport ( Viewport && _other)
noexcept

Takes over another instance of a viewport.

Parameters
_otherThe viewport instance to take over.

◆ ~Viewport()

Viewport::~Viewport ( )
overridedefaultnoexcept

Releases the render target instance.

Member Function Documentation

◆ getMaxDepth()

Float Viewport::getMaxDepth ( ) const
overridevirtualnoexcept

Gets the maximum depth of the viewport.

Returns
The maximum depth of the viewport.

Implements LiteFX::Rendering::IViewport.

◆ getMinDepth()

Float Viewport::getMinDepth ( ) const
overridevirtualnoexcept

Gets the minimum depth of the viewport.

Returns
The minimum depth of the viewport.

Implements LiteFX::Rendering::IViewport.

◆ getRectangle()

RectF Viewport::getRectangle ( ) const
overridevirtualnoexcept

Gets the rectangle that defines the dimensions of the viewport.

Returns
The rectangle that defines the dimensions of the viewport.

Implements LiteFX::Rendering::IViewport.

◆ operator=() [1/2]

Viewport & LiteFX::Rendering::Viewport::operator= ( const Viewport & _other)

Assigns a viewport by copying it.

Parameters
_otherThe viewport instance to copy.
Returns
A reference to the current viewport instance.

◆ operator=() [2/2]

Viewport & LiteFX::Rendering::Viewport::operator= ( Viewport && _other)
noexcept

Assigns a viewport by taking it over.

Parameters
_otherThe viewport to take over.
Returns
A reference to the current viewport instance.

◆ setMaxDepth()

void Viewport::setMaxDepth ( Float depth) const
overridevirtualnoexcept

Sets the maximum depth of the viewport.

Parameters
depthThe maximum depth of the viewport.

Implements LiteFX::Rendering::IViewport.

◆ setMinDepth()

void Viewport::setMinDepth ( Float depth) const
overridevirtualnoexcept

Sets the minimum depth of the viewport.

Parameters
depthThe minimum depth of the viewport.

Implements LiteFX::Rendering::IViewport.

◆ setRectangle()

void Viewport::setRectangle ( const RectF & rectangle)
overridevirtualnoexcept

Sets the rectangle that defines the dimensions of the viewport.

Parameters
rectangleThe rectangle that defines the dimensions of the viewport.

Implements LiteFX::Rendering::IViewport.