Class to represent a viewport.
More...
|
static C3D_API Viewport | Perspective (Engine &p_engine, Castor::Angle const &p_fovy, real p_aspect, real p_near, real p_far) |
| Builds a centered perspective viewport. More...
|
|
static C3D_API Viewport | Frustum (Engine &p_engine, real p_left, real p_right, real p_bottom, real p_top, real p_near, real p_far) |
| Builds a matrix that sets a non centered perspective projection from the given parameters. More...
|
|
static C3D_API Viewport | Ortho (Engine &p_engine, real p_left, real p_right, real p_bottom, real p_top, real p_near, real p_far) |
| Builds a matrix that sets an orthogonal projection. More...
|
|
|
static C3D_API const Castor::String | string_type [eVIEWPORT_TYPE_COUNT] |
|
Class to represent a viewport.
- Author
- Sylvain DOREMUS
- Version
- 0.1
- Date
- 09/02/2010
◆ Viewport()
Constructor.
- Parameters
-
[in] | p_engine | The core engine |
[in] | p_type | Projection type |
◆ ~Viewport()
virtual C3D_API Castor3D::Viewport::~Viewport |
( |
| ) |
|
|
virtual |
◆ Frustum()
static C3D_API Viewport Castor3D::Viewport::Frustum |
( |
Engine & |
p_engine, |
|
|
real |
p_left, |
|
|
real |
p_right, |
|
|
real |
p_bottom, |
|
|
real |
p_top, |
|
|
real |
p_near, |
|
|
real |
p_far |
|
) |
| |
|
static |
Builds a matrix that sets a non centered perspective projection from the given parameters.
- Parameters
-
[in] | p_engine | The core engine |
[in] | p_left | Left clipping plane value. |
[in] | p_right | Right clipping plane value. |
[in] | p_bottom | Bottom clipping plane value. |
[in] | p_top | Top clipping plane value. |
[in] | p_near | Near clipping plane value. |
[in] | p_far | Far clipping plane value. |
- Returns
- The viewport.
◆ GetBottom()
real Castor3D::Viewport::GetBottom |
( |
| ) |
const |
|
inline |
- Returns
- The bottom plane position
◆ GetFar()
real Castor3D::Viewport::GetFar |
( |
| ) |
const |
|
inline |
- Returns
- The far plane position
◆ GetFovY()
Castor::Angle Castor3D::Viewport::GetFovY |
( |
| ) |
const |
|
inline |
- Returns
- The view vertical angle
◆ GetFrustumPlane()
const Castor::PlaneEquation< real >& Castor3D::Viewport::GetFrustumPlane |
( |
eFRUSTUM_PLANE |
p_ePlane | ) |
const |
|
inline |
Retrieves the wanted frustum view plane.
- Parameters
-
[in] | p_ePlane | The wanted plane index |
- Returns
- The value
◆ GetHeight()
uint32_t Castor3D::Viewport::GetHeight |
( |
| ) |
const |
|
inline |
- Returns
- The viewport height
◆ GetLeft()
real Castor3D::Viewport::GetLeft |
( |
| ) |
const |
|
inline |
- Returns
- The left plane position
◆ GetNear()
real Castor3D::Viewport::GetNear |
( |
| ) |
const |
|
inline |
- Returns
- The near plane position
◆ GetProjection()
Castor::Matrix4x4r const& Castor3D::Viewport::GetProjection |
( |
| ) |
const |
|
inline |
- Returns
- The projection matrix
◆ GetRatio()
real Castor3D::Viewport::GetRatio |
( |
| ) |
const |
|
inline |
◆ GetRight()
real Castor3D::Viewport::GetRight |
( |
| ) |
const |
|
inline |
- Returns
- The right plane position
◆ GetSize()
const Castor::Size& Castor3D::Viewport::GetSize |
( |
| ) |
const |
|
inline |
- Returns
- The viewport render size
◆ GetTop()
real Castor3D::Viewport::GetTop |
( |
| ) |
const |
|
inline |
- Returns
- The top plane position
◆ GetType()
- Returns
- The viewport projection type
◆ GetWidth()
uint32_t Castor3D::Viewport::GetWidth |
( |
| ) |
const |
|
inline |
- Returns
- The viewport width
◆ IsModified()
bool Castor3D::Viewport::IsModified |
( |
| ) |
const |
|
inline |
- Returns
- The viewport modificiation status
◆ Ortho()
static C3D_API Viewport Castor3D::Viewport::Ortho |
( |
Engine & |
p_engine, |
|
|
real |
p_left, |
|
|
real |
p_right, |
|
|
real |
p_bottom, |
|
|
real |
p_top, |
|
|
real |
p_near, |
|
|
real |
p_far |
|
) |
| |
|
static |
Builds a matrix that sets an orthogonal projection.
- Parameters
-
[in] | p_engine | The core engine |
[in] | p_left | Left clipping plane value. |
[in] | p_right | Right clipping plane value. |
[in] | p_bottom | Bottom clipping plane value. |
[in] | p_top | Top clipping plane value. |
[in] | p_near | Near clipping plane value. |
[in] | p_far | Far clipping plane value. |
- Returns
- The viewport.
◆ Perspective()
static C3D_API Viewport Castor3D::Viewport::Perspective |
( |
Engine & |
p_engine, |
|
|
Castor::Angle const & |
p_fovy, |
|
|
real |
p_aspect, |
|
|
real |
p_near, |
|
|
real |
p_far |
|
) |
| |
|
static |
Builds a centered perspective viewport.
- Parameters
-
[in] | p_engine | The core engine |
[in] | p_fovy | Y Field of View. |
[in] | p_aspect | Width / Height ratio. |
[in] | p_near | Near clipping plane value. |
[in] | p_far | Far clipping plane value. |
- Returns
- The viewport.
◆ Render()
C3D_API bool Castor3D::Viewport::Render |
( |
Pipeline & |
p_pipeline | ) |
|
Renders the viewport specifics.
- Returns
true
if the frustum view has been modified
◆ SetBottom()
void Castor3D::Viewport::SetBottom |
( |
real |
p_rBottom | ) |
|
|
inline |
Retrieves the bottom plane position.
- Returns
- The value
◆ SetFar()
void Castor3D::Viewport::SetFar |
( |
real |
p_rFar | ) |
|
|
inline |
Retrieves the far plane position.
- Returns
- The value
◆ SetFovY()
void Castor3D::Viewport::SetFovY |
( |
Castor::Angle const & |
p_aFovY | ) |
|
|
inline |
Retrieves the vertical view angle.
- Returns
- The value
◆ SetLeft()
void Castor3D::Viewport::SetLeft |
( |
real |
p_rLeft | ) |
|
|
inline |
Retrieves the left plane position.
- Returns
- The value
◆ SetNear()
void Castor3D::Viewport::SetNear |
( |
real |
p_rNear | ) |
|
|
inline |
Retrieves the near plane position.
- Returns
- The value
◆ SetRatio()
void Castor3D::Viewport::SetRatio |
( |
real |
p_rRatio | ) |
|
|
inline |
Retrieves the aspect ratio.
- Returns
- The value
◆ SetRight()
void Castor3D::Viewport::SetRight |
( |
real |
p_rRight | ) |
|
|
inline |
Retrieves the right plane position.
- Returns
- The value
◆ SetSize()
void Castor3D::Viewport::SetSize |
( |
const Castor::Size & |
p_size | ) |
|
|
inline |
Sets the viewport render size.
- Parameters
-
◆ SetTop()
void Castor3D::Viewport::SetTop |
( |
real |
p_rTop | ) |
|
|
inline |
Retrieves the top plane position.
- Returns
- The value
◆ SetType()
Retrieves the viewport projection type.
- Returns
- The value
◆ string_type
C3D_API const Castor::String Castor3D::Viewport::string_type[eVIEWPORT_TYPE_COUNT] |
|
static |
The documentation for this class was generated from the following file:
- Z:/Projets/C++/Castor3D/source/Core/Castor3D/Src/Viewport.hpp