![]() |
LibCarna Version 3.4.0
|
Represents the point-of-view and defines the 3D to 2D projection. More...
#include <Camera.hpp>
Inheritance diagram for LibCarna::base::Camera:
Collaboration diagram for LibCarna::base::Camera:Public Member Functions | |
| Camera () | |
Instantiates with setOrthogonalProjectionHint set to false. | |
| void | setProjection (const math::Matrix4f &) |
| Sets the matrix that is to be used for mapping view space to clipping coordinates. Perspective projections can be obtained via math::frustum4f. | |
| const math::Matrix4f & | projection () const |
| References the projection matrix of this camera. The projection matrix maps from view space to clipping coordinates. | |
| void | setOrthogonalProjectionHint (bool isOrthogonalProjection) |
| Sets hint whether projection is orthogonal or perspectival. | |
| bool | isOrthogonalProjectionHintSet () const |
| Tells whether projection is likely to be orthogonal or perspectival. | |
| const math::Matrix4f & | viewTransform () const |
| References the view matrix, that is the inverse worldTransform matrix. | |
| virtual void | updateWorldTransform () override |
| Updates the viewTransform matrix. | |
Public Member Functions inherited from LibCarna::base::Spatial | |
| Spatial (const std::string &tag="") | |
| Instantiates. | |
| virtual | ~Spatial () |
| Does nothing. | |
| bool | hasParent () const |
| Tells whether this spatial has a parent node. | |
| Spatial * | detachFromParent () |
| Detaches this spatial from it's parent node in \(\mathcal O\left(\log n\right)\) where \(n\) is the number of parent's children. The caller takes possession of this spatial. | |
| void | updateParent (Node &parent) |
| Fixes tree consistency by updating parent of this spatial. This method is for internal usage only. | |
| Node & | parent () |
| References the parent node. | |
| const Node & | parent () const |
| Node & | findRoot () |
| References the root node this spatial belongs to. | |
| const Node & | findRoot () const |
| References the root node this spatial belongs to. | |
| const math::Matrix4f & | worldTransform () const |
| Tells the transformation to world space for this spatial that was last computed. | |
| template<typename UserDataType > | |
| void | setUserData (const UserDataType &userData) |
Links an arbitrary object with this Spatial instance. | |
| void | removeUserData () |
Removes any object that has been linked with this Spatial instance through setUserData previously. | |
| bool | hasUserData () const |
Tells whether an object has been linked with this Spatial instance through setUserData previously. | |
| template<typename UserDataType > | |
| const UserDataType & | userData () const |
Retrieves the object previously linked with this Spatial instance. | |
| void | setMovable (bool movable) |
Sets whether this spatial may be displaced w.r.t. it's parent through user interaction. Usually this will be false when this spatial represents a component of it's parent, like the shaft of an arrow. | |
| bool | isMovable () const |
Tells whether this spatial may be displaced w.r.t. it's parent through user interaction. Usually this will be false when this spatial represents a component of it's parent, like the shaft of an arrow. | |
| virtual void | invalidate () |
| Notifies all listeners of its parent nodes that their subtrees have changed. This may include changes of the tree structure as well as updated materials and suchlike. | |
| void | setTag (const std::string &tag) |
| Sets an arbitrary tag that may be used to identify this object. | |
| const std::string & | tag () const |
| Tells the tag set previously. | |
Additional Inherited Members | |
Public Types inherited from LibCarna::base::Spatial | |
| typedef std::function< void(Spatial &) > | MutableVisitor |
| Declares an entity that visits mutable Spatial instances. | |
| typedef std::function< void(const Spatial &) > | ImmutableVisitor |
| Declares an entity that visits mutable Spatial instances. | |
Public Attributes inherited from LibCarna::base::Spatial | |
| math::Matrix4f | localTransform |
| Defines the location, rotation and scale of this spatial in relation to it's parent. If this spatial has no parent, the value has no meaning. | |
Represents the point-of-view and defines the 3D to 2D projection.
Definition at line 42 of file Camera.hpp.
Updates the viewTransform matrix.
Reimplemented from LibCarna::base::Spatial.
Written by Leonid Kostrykin © 2021–2025. Based on Carna (© 2010-2016).
Documentation generated by Doxygen