Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
ph::Viewport Class Referencefinal

#include <Viewport.h>

Public Member Functions

 Viewport ()
 Creates empty viewport.
 
 Viewport (math::TVector2< uint32 > baseSizePx)
 
 Viewport (math::TVector2< uint32 > baseSizePx, math::TAABB2D< int64 > windowPx)
 
const math::TVector2< uint32 > & getBaseSizePx () const
 The full size of this viewport.
 
const math::TAABB2D< int64 > & getWindowPx () const
 The window that limits the viewing area of this viewport.
 
math::TAABB2D< int64 > getCroppedRegionPx () const
 The viewing area of this viewport. The difference between cropped region and window is that cropped region will never exceed the area defined by base size.
 
std::size_t numBasePixels () const
 
std::size_t numCroppedRegionPixels () const
 
bool hasView () const
 Whether there is any viewable area in the viewport.
 
std::string toString () const
 

Constructor & Destructor Documentation

◆ Viewport() [1/3]

ph::Viewport::Viewport ( )
inline

Creates empty viewport.

◆ Viewport() [2/3]

ph::Viewport::Viewport ( math::TVector2< uint32 > baseSizePx)
inlineexplicit

◆ Viewport() [3/3]

ph::Viewport::Viewport ( math::TVector2< uint32 > baseSizePx,
math::TAABB2D< int64 > windowPx )
inline

Member Function Documentation

◆ getBaseSizePx()

const math::TVector2< uint32 > & ph::Viewport::getBaseSizePx ( ) const
inline

The full size of this viewport.

◆ getCroppedRegionPx()

math::TAABB2D< int64 > ph::Viewport::getCroppedRegionPx ( ) const
inline

The viewing area of this viewport. The difference between cropped region and window is that cropped region will never exceed the area defined by base size.

◆ getWindowPx()

const math::TAABB2D< int64 > & ph::Viewport::getWindowPx ( ) const
inline

The window that limits the viewing area of this viewport.

◆ hasView()

bool ph::Viewport::hasView ( ) const
inline

Whether there is any viewable area in the viewport.

◆ numBasePixels()

std::size_t ph::Viewport::numBasePixels ( ) const
inline

◆ numCroppedRegionPixels()

std::size_t ph::Viewport::numCroppedRegionPixels ( ) const
inline

◆ toString()

std::string ph::Viewport::toString ( ) const
inline

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