Castor3D
..
|
Class which represents a Camera. More...
Classes | |
class | BinaryParser |
class | TextLoader |
Camera loader. More... | |
Public Member Functions | |
C3D_API | Camera (Castor::String const &p_name, Scene &p_scene, const SceneNodeSPtr p_node, Viewport const &p_viewport) |
Constructor, needs the camera renderer, the name, window size and projection type. Creates a viewport renderer and a viewport. More... | |
C3D_API | Camera (Castor::String const &p_name, Scene &p_scene, const SceneNodeSPtr p_node) |
Constructor, needs the camera renderer, the name, window size and projection type. Creates a viewport renderer and a viewport. More... | |
virtual C3D_API | ~Camera () |
Destructor. More... | |
virtual C3D_API void | Render () |
Applies the viewport, the rotation ... More... | |
virtual C3D_API void | EndRender () |
Removes the transformations. More... | |
C3D_API void | Resize (uint32_t p_width, uint32_t p_height) |
Resizes the viewport. More... | |
C3D_API void | Resize (Castor::Size const &p_size) |
Resizes the viewport. More... | |
C3D_API void | ResetOrientation () |
Sets the orientation to identity. More... | |
C3D_API void | ResetPosition () |
Sets the position to 0. More... | |
C3D_API eVIEWPORT_TYPE | GetViewportType () const |
Retrieves the viewport type. More... | |
C3D_API void | SetViewportType (eVIEWPORT_TYPE val) |
Sets the viewport type. More... | |
C3D_API uint32_t | GetWidth () const |
Retrieves the viewport width. More... | |
C3D_API uint32_t | GetHeight () const |
Retrieves the viewport height. More... | |
C3D_API bool | IsVisible (Castor::CubeBox const &p_box, Castor::Matrix4x4r const &m_transformations) const |
Checks if given CubeBox is in the view frustum. More... | |
C3D_API bool | IsVisible (Castor::Point3r const &p_point) const |
Checks if given point is in the view frustum. More... | |
Viewport const & | GetViewport () const |
Retrieves the Viewport. More... | |
Viewport & | GetViewport () |
Retrieves the Viewport. More... | |
virtual Castor::Matrix4x4r const & | GetView () const |
Retrieves the view matrix. More... | |
Public Member Functions inherited from Castor3D::MovableObject | |
C3D_API | MovableObject (Castor::String const &p_name, Scene &p_scene, eMOVABLE_TYPE p_type, SceneNodeSPtr p_sn) |
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 (SceneNodeSPtr p_node) |
Attaches the movable object to a node. More... | |
Castor::String const & | GetName () const |
Retrieves the object name. More... | |
SceneNodeSPtr | GetParent () const |
Retrieves the parent node. More... | |
eMOVABLE_TYPE | GetType () const |
Retrieves the object type. More... | |
void | SetName (Castor::String const &p_name) |
Sets the object name. More... | |
Public Member Functions inherited from Castor3D::Animable | |
C3D_API AnimationSPtr | CreateAnimation (Castor::String const &p_name) |
Creates an animation. More... | |
C3D_API void | CleanupAnimations () |
Empties the animations map. More... | |
C3D_API AnimationSPtr | GetAnimation (Castor::String const &p_name) |
Retrieves an animation. More... | |
AnimationPtrStrMap const & | GetAnimations () const |
Friends | |
class | Scene |
class | CameraRenderer |
Additional Inherited Members | |
Protected Member Functions inherited from Castor3D::Animable | |
Animable () | |
Constructor. More... | |
~Animable () | |
Destructor. More... | |
Protected Attributes inherited from Castor3D::MovableObject | |
eMOVABLE_TYPE | m_type |
Movable object type. More... | |
Castor::String | m_name |
The object name. More... | |
Castor::String | m_strNodeName |
The parent node name. More... | |
SceneNodeWPtr | m_pSceneNode |
The parent scene node. More... | |
uint32_t | m_notifyIndex = 0 |
The node change notification index. More... | |
Protected Attributes inherited from Castor3D::Animable | |
AnimationPtrStrMap | m_animations |
All animations. More... | |
Class which represents a Camera.
C3D_API Castor3D::Camera::Camera | ( | Castor::String const & | p_name, |
Scene & | p_scene, | ||
const SceneNodeSPtr | p_node, | ||
Viewport const & | p_viewport | ||
) |
Constructor, needs the camera renderer, the name, window size and projection type. Creates a viewport renderer and a viewport.
[in] | p_name | The camera name |
[in] | p_scene | The parent scene |
[in] | p_node | The parent scene node |
[in] | p_viewport | Viewport to copy |
C3D_API Castor3D::Camera::Camera | ( | Castor::String const & | p_name, |
Scene & | p_scene, | ||
const SceneNodeSPtr | p_node | ||
) |
Constructor, needs the camera renderer, the name, window size and projection type. Creates a viewport renderer and a viewport.
[in] | p_name | The camera name |
[in] | p_scene | The parent scene |
[in] | p_node | The parent scene node |
|
virtual |
Destructor.
|
virtual |
Removes the transformations.
C3D_API uint32_t Castor3D::Camera::GetHeight | ( | ) | const |
Retrieves the viewport height.
|
inlinevirtual |
Retrieves the view matrix.
|
inline |
C3D_API eVIEWPORT_TYPE Castor3D::Camera::GetViewportType | ( | ) | const |
Retrieves the viewport type.
C3D_API uint32_t Castor3D::Camera::GetWidth | ( | ) | const |
Retrieves the viewport width.
C3D_API bool Castor3D::Camera::IsVisible | ( | Castor::CubeBox const & | p_box, |
Castor::Matrix4x4r const & | m_transformations | ||
) | const |
Checks if given CubeBox is in the view frustum.
[in] | p_box | The CubeBox |
[in] | m_transformations | The CubeBox transformations matrix |
false
if the CubeBox is completely out of the view frustum C3D_API bool Castor3D::Camera::IsVisible | ( | Castor::Point3r const & | p_point | ) | const |
Checks if given point is in the view frustum.
[in] | p_point | The point |
false
if the point out of the view frustum
|
virtual |
Applies the viewport, the rotation ...
C3D_API void Castor3D::Camera::ResetOrientation | ( | ) |
Sets the orientation to identity.
C3D_API void Castor3D::Camera::ResetPosition | ( | ) |
Sets the position to 0.
C3D_API void Castor3D::Camera::Resize | ( | uint32_t | p_width, |
uint32_t | p_height | ||
) |
Resizes the viewport.
[in] | p_width,p_height | Display window size |
C3D_API void Castor3D::Camera::Resize | ( | Castor::Size const & | p_size | ) |
Resizes the viewport.
[in] | p_size | Display window size |
C3D_API void Castor3D::Camera::SetViewportType | ( | eVIEWPORT_TYPE | val | ) |
Sets the viewport type.
[in] | val | The viewport type |
|
friend |
|
friend |