![]() |
Castor3D 0.12.0
Multiplatform 3D engine
|
#include <Camera.hpp>
Public Member Functions | |
C3D_API | Camera (castor::String const &name, Scene &scene, SceneNode &node, Viewport viewport, bool ownProjMtx=false) |
Constructor. More... | |
C3D_API | Camera (castor::String const &name, Scene &scene, SceneNode &node, bool ownProjMtx=false) |
Constructor, needs the camera renderer, the name, window size and projection type. Creates a viewport renderer and a viewport. More... | |
C3D_API void | attachTo (SceneNode &node) override |
Attaches this light to a Material. More... | |
C3D_API void | updateFrustum () |
Updates the frustum. More... | |
C3D_API void | update () |
Updates the viewport, the view matrix, and the frustum. More... | |
C3D_API void | setProjection (castor::Matrix4x4f const &projection) |
Sets the projection matrix, updates the viewport and the frustum. More... | |
C3D_API bool | isVisible (Geometry const &geometry, Submesh const &submesh) const |
Checks if a submesh is visible, through a geometry. More... | |
Viewport const & | getViewport () const |
Viewport & | getViewport () |
castor::Matrix4x4f const & | getView () const |
castor::Matrix4x4f const & | getProjection (bool safeBanded) const |
ViewportType | getViewportType () const |
castor::Size const & | getSize () const |
uint32_t | getWidth () const |
uint32_t | getHeight () const |
float | getNear () const |
float | getFar () const |
float | getRatio () const |
castor::Angle const & | getFovY () const |
float | getProjectionScale () const |
bool | isVisible (castor::BoundingBox const &box, castor::Matrix4x4f const &transformations) const |
bool | isVisible (castor::BoundingSphere const &sphere, castor::Matrix4x4f const &transformations, castor::Point3f const &scale) const |
bool | isVisible (castor::Point3f const &point) const |
Frustum const & | getFrustum () const |
HdrConfig const & | getHdrConfig () const |
HdrConfig & | getHdrConfig () |
void | setView (castor::Matrix4x4f const &view) |
void | resize (uint32_t width, uint32_t height) |
void | resize (castor::Size const &size) |
void | setViewportType (ViewportType value) |
void | setExposure (float value) |
void | setGamma (float value) |
![]() | |
C3D_API | MovableObject (castor::String const &name, Scene &scene, MovableType type, SceneNode &node) |
Constructor. More... | |
C3D_API | MovableObject (castor::String const &name, Scene &scene, MovableType type) |
Constructor. More... | |
virtual C3D_API | ~MovableObject () |
Destructor. More... | |
C3D_API void | detach () |
Detaches the movable object from it's parent. More... | |
virtual C3D_API void | attachTo (SceneNode &node) |
Attaches the movable object to a node. More... | |
C3D_API EngineRPtr | getEngine () const |
SceneNode * | getParent () const |
MovableType | getType () const |
Public Attributes | |
OnCameraChanged | onChanged |
Friends | |
class | Scene |
Additional Inherited Members | |
![]() | |
MovableType | m_type |
castor::String | m_strNodeName |
SceneNode * | m_sceneNode |
OnSceneNodeChangedConnection | m_notifyIndex |
C3D_API castor3d::Camera::Camera | ( | castor::String const & | name, |
Scene & | scene, | ||
SceneNode & | node, | ||
Viewport | viewport, | ||
bool | ownProjMtx = false |
||
) |
Constructor.
[in] | name | The camera name. |
[in] | scene | The parent scene. |
[in] | node | The parent scene node. |
[in] | viewport | Viewport to copy. |
[in] | ownProjMtx | Tells if the projection matrix is held by the viewport false , or not true . |
C3D_API castor3d::Camera::Camera | ( | castor::String const & | name, |
Scene & | scene, | ||
SceneNode & | node, | ||
bool | ownProjMtx = false |
||
) |
Constructor, needs the camera renderer, the name, window size and projection type. Creates a viewport renderer and a viewport.
[in] | name | The camera name. |
[in] | scene | The parent scene. |
[in] | node | The parent scene node. |
[in] | ownProjMtx | Tells if the projection matrix is held by the viewport false , or not true . |
Attaches this light to a Material.
[in] | node | The new light's parent node |
Reimplemented from castor3d::MovableObject.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
References castor3d::Viewport::getProjection(), and castor3d::Viewport::getSafeBandedProjection().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
name Getters.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
C3D_API bool castor3d::Camera::isVisible | ( | Geometry const & | geometry, |
Submesh const & | submesh | ||
) | const |
Checks if a submesh is visible, through a geometry.
[in] | geometry | The geometry. |
[in] | submesh | The submesh. |
false
if the submesh is not visible.
|
inline |
References castor3d::Viewport::getSize(), onChanged, and castor3d::Viewport::resize().
|
inline |
|
inline |
References castor3d::HdrConfig::exposure, and onChanged.
|
inline |
References castor3d::HdrConfig::gamma, and onChanged.
C3D_API void castor3d::Camera::setProjection | ( | castor::Matrix4x4f const & | projection | ) |
Sets the projection matrix, updates the viewport and the frustum.
[in] | projection | The projection matrix. |
|
inline |
name Mutators.
References onChanged.
|
inline |
References onChanged, and castor3d::Viewport::updateType().
C3D_API void castor3d::Camera::update | ( | ) |
Updates the viewport, the view matrix, and the frustum.
C3D_API void castor3d::Camera::updateFrustum | ( | ) |
Updates the frustum.
|
friend |
|
mutable |
The signal raised when the camera has changed.
Referenced by resize(), setExposure(), setGamma(), setView(), and setViewportType().