Carna  Version 3.3.2
Public Member Functions | List of all members
Carna::base::Camera Class Reference

Represents the point-of-view and defines the 3D to 2D projection. More...

#include <Camera.h>

+ Inheritance diagram for Carna::base::Camera:
+ Collaboration diagram for Carna::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::Matrix4fprojection () 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::Matrix4fviewTransform () const
 References the view matrix, that is the inverse worldTransform matrix.
 
virtual void updateWorldTransform () override
 Updates the viewTransform matrix.
 
- Public Member Functions inherited from Carna::base::Spatial
 Spatial (const std::string &tag="")
 Instantiates. More...
 
virtual ~Spatial ()
 Does nothing.
 
bool hasParent () const
 Tells whether this spatial has a parent node.
 
SpatialdetachFromParent ()
 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.
 
Nodeparent ()
 References the parent node. More...
 
const Nodeparent () const
 
NodefindRoot ()
 References the root node this spatial belongs to.
 
const NodefindRoot () const
 References the root node this spatial belongs to.
 
const math::Matrix4fworldTransform () 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

- Public Types inherited from Carna::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 Carna::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. More...
 

Detailed Description

Represents the point-of-view and defines the 3D to 2D projection.

Author
Leonid Kostrykin
Date
22.2.15 - 16.3.15

Definition at line 39 of file Camera.h.


The documentation for this class was generated from the following file: