Carna
Version 3.3.2
|
Represents the point-of-view and defines the 3D to 2D projection. More...
#include <Camera.h>
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. | |
![]() | |
Spatial (const std::string &tag="") | |
Instantiates. More... | |
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. More... | |
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. More... | |
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. More... | |
void | removeUserData () |
Removes any object that has been linked with this Spatial instance through setUserData previously. More... | |
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. More... | |
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. More... | |
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. More... | |
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 | |
![]() | |
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. | |
![]() | |
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. More... | |
Represents the point-of-view and defines the 3D to 2D projection.
Documentation generated by Doxygen