Aether3D
Game Engine
Public Member Functions | List of all members
Camera Class Referenceabstract

Perspective or orthographic camera. More...

#include <Camera.hpp>

Inheritance diagram for Camera:
SceneGraphNode

Public Member Functions

virtual void LookAt (const Vec3 &eye, const Vec3 &center, const Vec3 &up)=0
 
virtual void MoveForward (float amount)=0
 
virtual void MoveRight (float amount)=0
 
virtual void MoveUp (float amount)=0
 
virtual void OffsetRotation (const Vec3 &axis, float angleDegrees)=0
 
virtual Vec3 ScreenPoint (const Vec3 &worldPoint) const =0
 
virtual void SetProjection (float fieldOfViewDegrees, float aspect, float nearDepth, float farDepth)=0
 
virtual void SetViewport (int left, int right, int top, int bottom)=0
 
virtual void SetProjection (float left, float right, float bottom, float top, float nearDepth, float farDepth)=0
 
virtual void SetRenderTarget (Texture *target)=0
 
virtual Vec3 ViewDirection () const =0
 
virtual float FarClipPlane () const =0
 
virtual float NearClipPlane () const =0
 
- Public Member Functions inherited from SceneGraphNode
 SceneGraphNode ()
 
virtual ~SceneGraphNode ()
 
virtual bool AddChild (SceneGraphNode *child)
 
virtual bool ContainsChild (const SceneGraphNode *node) const
 
virtual void FindFirstChildWithName (const char *name, SceneGraphNode **outNode)
 
virtual void SetLayerMask (unsigned mask)
 
virtual void SetName (const std::string &newName)
 
virtual void SetPosition (const Vec3 &aPosition)
 
virtual void SetRotation (const Quaternion &aRotation)
 
virtual Quaternion GetRotation () const
 
virtual void SetScale (float aScale)
 
virtual float GetScale () const
 
virtual void SolveMatrices ()
 
virtual SceneGraphNodeParent ()
 
virtual std::string GetName () const
 
virtual Type GetType () const
 
virtual unsigned GetLayerMask () const
 
virtual std::list< SceneGraphNode * > & Children ()
 
virtual Vec3 GetPosition () const
 
virtual SceneGraphNodeRoot ()
 
void CleanDirties ()
 
bool IsDirty () const
 

Additional Inherited Members

- Public Types inherited from SceneGraphNode
enum  Type { None, Model, Camera, Light }
 
- Static Public Member Functions inherited from SceneGraphNode
static void RegisterScene (Scene *scene)
 
static void UnregisterScene ()
 
- Public Attributes inherited from SceneGraphNode
std::list< SceneGraphNode * > children
 
Matrix44 modelMatrix
 
- Protected Attributes inherited from SceneGraphNode
Type type
 
float scale
 
Vec3 position
 
SceneGraphNodeparent
 
Quaternion rotation
 
std::string name
 
bool dirtyTransform = true
 
unsigned layerMask = 0xFFFFFFFF
 

Detailed Description

Perspective or orthographic camera.

Member Function Documentation

◆ FarClipPlane()

virtual float Camera::FarClipPlane ( ) const
pure virtual
Returns
Far clip plane distance.

◆ LookAt()

virtual void Camera::LookAt ( const Vec3 eye,
const Vec3 center,
const Vec3 up 
)
pure virtual

Looks at a point.

Parameters
eyeCamera's new position.
centerPoint in space that's looked at.
upUp-vector.

◆ MoveForward()

virtual void Camera::MoveForward ( float  amount)
pure virtual
Parameters
amountMovement amount.

◆ MoveRight()

virtual void Camera::MoveRight ( float  amount)
pure virtual
Parameters
amountMovement amount.

◆ MoveUp()

virtual void Camera::MoveUp ( float  amount)
pure virtual
Parameters
amountMovement amount.

◆ NearClipPlane()

virtual float Camera::NearClipPlane ( ) const
pure virtual
Returns
Near clip plane distance.

◆ OffsetRotation()

virtual void Camera::OffsetRotation ( const Vec3 axis,
float  angleDegrees 
)
pure virtual
Parameters
axisAxis, should be normalized.
angleDegreesAngle in degrees.

◆ ScreenPoint()

virtual Vec3 Camera::ScreenPoint ( const Vec3 worldPoint) const
pure virtual

Gets screen coordinate of a world point.

Parameters
worldPointPoint in scene.
Returns
Vector containing screen position of worldPoint. z is unused.
Todo:
More specific.

◆ SetProjection() [1/2]

virtual void Camera::SetProjection ( float  fieldOfViewDegrees,
float  aspect,
float  nearDepth,
float  farDepth 
)
pure virtual

Sets perspective projection.

Parameters
fieldOfViewDegreesField-of-View in degrees.
aspectAspect ratio.
nearDepthNear plane distance.
farDepthFar plane distance.

◆ SetProjection() [2/2]

virtual void Camera::SetProjection ( float  left,
float  right,
float  bottom,
float  top,
float  nearDepth,
float  farDepth 
)
pure virtual

Sets orthographic projection.

Parameters
leftLeft.
rightRight.
bottomBottom.
topTop.
nearDepthNear plane distance.
farDepthFar plane distance.

◆ SetRenderTarget()

virtual void Camera::SetRenderTarget ( Texture target)
pure virtual

Sets render target. Defaults to screen backbuffer.

Parameters
targetTarget texture. Must have been created using dll.MakeRenderTexture(). Passing 0 renders to the back buffer.

◆ SetViewport()

virtual void Camera::SetViewport ( int  left,
int  right,
int  top,
int  bottom 
)
pure virtual

Sets the viewport. Defaults to the window dimension.

Parameters
leftLeft.
rightRight.
topTop.
bottomBottom.

◆ ViewDirection()

virtual Vec3 Camera::ViewDirection ( ) const
pure virtual
Returns
View direction.

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