![]() |
Castor3D 0.17.0
Multiplatform 3D engine
|
#include <Viewport.hpp>
Public Member Functions | |
| C3D_API Viewport & | operator= (Viewport const &rhs)=delete |
| C3D_API Viewport & | operator= (Viewport &&rhs) noexcept=delete |
| C3D_API | Viewport (Viewport const &rhs) |
| C3D_API | Viewport (Viewport &&rhs) noexcept |
| C3D_API | ~Viewport () noexcept=default |
| C3D_API | Viewport (Engine const &engine) |
| Constructor. | |
| C3D_API bool | update () |
| Applies the perspective. | |
| C3D_API void | cloneInto (Viewport &output) const |
| Clones this object into the given one. | |
| C3D_API void | setPerspective (castor::Angle const &fovy, float aspect, float nearZ, float farZ) |
| Builds a centered perspective viewport. | |
| C3D_API void | setInfinitePerspective (castor::Angle const &fovy, float aspect, float nearZ) |
| Builds a centered perspective viewport with infinite far plane. | |
| C3D_API void | setFrustum (float left, float right, float bottom, float top, float nearZ, float farZ) |
| Builds a matrix that Sets a non centered perspective projection from the given parameters. | |
| C3D_API void | setOrtho (float left, float right, float bottom, float top, float nearZ, float farZ) |
| Builds a matrix that Sets an orthogonal projection. | |
| C3D_API void | resize (const castor::Size &value) |
| Sets the viewport render size. | |
| C3D_API float | getProjectionScale () const |
| C3D_API castor::Matrix4x4f | getRescaledProjection (float scale) const |
| C3D_API castor::Matrix4x4f | getRescaledSafeBandedProjection (float scale) const |
| castor::Size const & | getSize () const noexcept |
| castor::Position const & | getPosition () const noexcept |
| ViewportType | getType () const noexcept |
| float | getRatio () const noexcept |
| float | getNear () const noexcept |
| float | getFar () const noexcept |
| castor::Angle const & | getFovY () const noexcept |
| float | getLeft () const noexcept |
| float | getRight () const noexcept |
| float | getTop () const noexcept |
| float | getBottom () const noexcept |
| uint32_t | getWidth () const noexcept |
| uint32_t | getHeight () const noexcept |
| bool | isModified () const noexcept |
| castor::Matrix4x4f const & | getProjection () const noexcept |
| castor::Matrix4x4f const & | getSafeBandedProjection () const noexcept |
| VkViewport const & | getViewport () const noexcept |
| VkRect2D const & | getScissor () const noexcept |
| Engine const & | getEngine () const noexcept |
| void | setPosition (castor::Position const &value) noexcept |
| void | updateType (ViewportType value) noexcept |
| void | updateRatio (float value) noexcept |
| void | updateNear (float value) noexcept |
| void | updateFar (float value) noexcept |
| void | updateFovY (castor::Angle const &value) noexcept |
| void | updateLeft (float value) noexcept |
| void | updateRight (float value) noexcept |
| void | updateTop (float value) noexcept |
| void | updateBottom (float value) noexcept |
Static Public Attributes | |
| static C3D_API const castor::Array< castor::String, size_t(ViewportType::eCount) > | TypeName |
|
defaultnoexcept |
Constructor.
| [in] | engine | The engine. |
Clones this object into the given one.
| [in,out] | output | Receives this object's data. |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
| C3D_API float castor3d::Viewport::getProjectionScale | ( | ) | const |
Referenced by castor3d::Camera::getProjectionScale().

|
inlinenoexcept |
| C3D_API castor::Matrix4x4f castor3d::Viewport::getRescaledProjection | ( | float | scale | ) | const |
name Getters.
| C3D_API castor::Matrix4x4f castor3d::Viewport::getRescaledSafeBandedProjection | ( | float | scale | ) | const |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Referenced by castor3d::Camera::getSize(), and castor3d::Camera::resize().

|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
| C3D_API void castor3d::Viewport::resize | ( | const castor::Size & | value | ) |
Sets the viewport render size.
| [in] | value | The new value |
Referenced by castor3d::Camera::resize().

| C3D_API void castor3d::Viewport::setFrustum | ( | float | left, |
| float | right, | ||
| float | bottom, | ||
| float | top, | ||
| float | nearZ, | ||
| float | farZ ) |
Builds a matrix that Sets a non centered perspective projection from the given parameters.
| [in] | left | Left clipping plane value. |
| [in] | right | Right clipping plane value. |
| [in] | bottom | Bottom clipping plane value. |
| [in] | top | Top clipping plane value. |
| [in] | nearZ | Near clipping plane value. |
| [in] | farZ | Far clipping plane value. |
| C3D_API void castor3d::Viewport::setInfinitePerspective | ( | castor::Angle const & | fovy, |
| float | aspect, | ||
| float | nearZ ) |
Builds a centered perspective viewport with infinite far plane.
| [in] | fovy | Y Field of View. |
| [in] | aspect | Width / Height ratio. |
| [in] | nearZ | Near clipping plane value. |
| C3D_API void castor3d::Viewport::setOrtho | ( | float | left, |
| float | right, | ||
| float | bottom, | ||
| float | top, | ||
| float | nearZ, | ||
| float | farZ ) |
Builds a matrix that Sets an orthogonal projection.
| [in] | left | Left clipping plane value. |
| [in] | right | Right clipping plane value. |
| [in] | bottom | Bottom clipping plane value. |
| [in] | top | Top clipping plane value. |
| [in] | nearZ | Near clipping plane value. |
| [in] | farZ | Far clipping plane value. |
| C3D_API void castor3d::Viewport::setPerspective | ( | castor::Angle const & | fovy, |
| float | aspect, | ||
| float | nearZ, | ||
| float | farZ ) |
Builds a centered perspective viewport.
| [in] | fovy | Y Field of View. |
| [in] | aspect | Width / Height ratio. |
| [in] | nearZ | Near clipping plane value. |
| [in] | farZ | Far clipping plane value. |
|
inlinenoexcept |
name Mutators.
| C3D_API bool castor3d::Viewport::update | ( | ) |
Applies the perspective.
true if the frustum view has been modified
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
static |