Public Types | Public Member Functions | Data Fields | Protected Attributes

Nytro::Scene::Camera Class Reference

A camera scene node, is the camera through where all scene is viewed. More...

#include <nyCamera.h>

Inheritance diagram for Nytro::Scene::Camera:
Inheritance graph
[legend]

Public Types

enum  ECameraProjection { eCameraProjection_Perspective, eCameraProjection_Top, eCameraProjection_Left, eCameraProjection_Front }
 

Camera projection type.

More...
enum  ECameraCommand {
  eCameraCommand_None = 0, eCameraCommand_Move, eCameraCommand_Yaw, eCameraCommand_Roll,
  eCameraCommand_Pitch
}
 

Send commands to the camera.

More...

Public Member Functions

 NYTRO_CLASS_NAME (Camera)
 Camera ()
virtual ~Camera ()
float32 getFov ()
float32 getAspectRatio ()
float32 getFarPlane ()
float32 getNearPlane ()
ECameraProjection getProjectionType ()
MatrixgetCameraMatrix ()
MatrixgetProjectionMatrix ()
FrustumgetFrustum ()
float32 getLookUpLimitAngle ()
float32 getLookDownLimitAngle ()
Vector3D getFixedYawAxis ()
bool isUsingFixedYawAxis ()
bool isLookLimitAnglesEnabled ()
void setFov (float32 aValue)
 set the camera Field Of View
void setAspectRatio (float32 aValue)
 set the camera aspect ratio
void setFarPlane (float32 aValue)
 set the camera far clipping plane distance
void setNearPlane (float32 aValue)
 set the camera near clipping plane distance
void setProjectionType (ECameraProjection aValue)
 set the camera projection type
void setCameraMatrix (Matrix &rValue)
 set the camera matrix
void setProjectionMatrix (Matrix &rValue)
 set the camera projection matrix
void setLookUpLimitAngle (float32 aValue)
 set the camera contrain up angle, when looking up
void setLookDownLimitAngle (float32 aValue)
 set the camera contrain down angle, when looking down
void setLookLimitAngles (bool bValue)
 enable or disable the look up and down limit angles
void setFixedYawAxis (Vector3D &rAxis)
 set the fixed yaw axis
void setUseFixedYawAxis (bool bUse)
 set to use the fixed yaw axis
void lookTowards (Vector3D &rValue)
 look towards a specific point in space (world space)
void lookTowards (float32 aX, float32 aY, float32 aZ)
 look towards a specific point in space (world space)
virtual void use ()
 use the camera, by setting camera view matrices
virtual void prepare ()
 prepare the camera for render
virtual void computeAspectRatio ()
 compute camera aspect ratio from view width and height
virtual void computeTransform ()
 compute the camera transform matrices
void executeCommand (ECameraCommand aCmd, float32 aParam1=0, float32 aParam2=0, float32 aParam3=0)
 execute a camera command with parameters
virtual void addYawAngle (float32 aDeg)
 yaw the camera around its current yaw axis, or automatically computed
virtual void addPitchAngle (float32 aDeg)
 pitch the camera
virtual void relativeMove (Vector3D &rDelta)
 move the camera on local frame, Z is the forward/backward amount, Y is up/down, X is left/right strafe
virtual void addRollAngle (float32 aDeg)
 set the current roll angle around the Z axis

Data Fields

 NYTRO_CLASS_HAS_PROPERTIES

Protected Attributes

float32 m_fov
float32 m_aspectRatio
float32 m_far
float32 m_near
ECameraProjection m_projectionType
Matrix m_cameraMatrix
Matrix m_projectionMatrix
Frustum m_frustum
float32 m_lookUpLimitAngle
float32 m_lookDownLimitAngle
Vector3D m_side
Vector3D m_fixedYawAxis
bool m_bUseFixedYawAxis
bool m_bLookLimitAngles

Detailed Description

A camera scene node, is the camera through where all scene is viewed.

Definition at line 21 of file nyCamera.h.


Member Enumeration Documentation

Send commands to the camera.

Enumerator:
eCameraCommand_None 
eCameraCommand_Move 
eCameraCommand_Yaw 
eCameraCommand_Roll 
eCameraCommand_Pitch 

Definition at line 35 of file nyCamera.h.

Camera projection type.

Enumerator:
eCameraProjection_Perspective 
eCameraProjection_Top 
eCameraProjection_Left 
eCameraProjection_Front 

Definition at line 26 of file nyCamera.h.


Constructor & Destructor Documentation

Nytro::Scene::Camera::Camera (  ) 
virtual Nytro::Scene::Camera::~Camera (  )  [virtual]

Member Function Documentation

virtual void Nytro::Scene::Camera::addPitchAngle ( float32  aDeg  )  [virtual]

pitch the camera

virtual void Nytro::Scene::Camera::addRollAngle ( float32  aDeg  )  [virtual]

set the current roll angle around the Z axis

virtual void Nytro::Scene::Camera::addYawAngle ( float32  aDeg  )  [virtual]

yaw the camera around its current yaw axis, or automatically computed

virtual void Nytro::Scene::Camera::computeAspectRatio (  )  [virtual]

compute camera aspect ratio from view width and height

virtual void Nytro::Scene::Camera::computeTransform (  )  [virtual]

compute the camera transform matrices

Reimplemented from Nytro::Scene::SceneNode.

void Nytro::Scene::Camera::executeCommand ( ECameraCommand  aCmd,
float32  aParam1 = 0,
float32  aParam2 = 0,
float32  aParam3 = 0 
)

execute a camera command with parameters

float32 Nytro::Scene::Camera::getAspectRatio (  ) 
Returns:
camera aspect ratio
Matrix& Nytro::Scene::Camera::getCameraMatrix (  ) 
Returns:
camera matrix
float32 Nytro::Scene::Camera::getFarPlane (  ) 
Returns:
camera far plane (usually ~50000.0f)
Vector3D Nytro::Scene::Camera::getFixedYawAxis (  ) 
Returns:
the fixed yaw axis
float32 Nytro::Scene::Camera::getFov (  ) 
Returns:
camera Field Of View angle
Frustum& Nytro::Scene::Camera::getFrustum (  ) 
Returns:
camera computed frustum
float32 Nytro::Scene::Camera::getLookDownLimitAngle (  ) 
Returns:
the camera look constrain down angle (when looking down, normally 90 degrees)
float32 Nytro::Scene::Camera::getLookUpLimitAngle (  ) 
Returns:
the camera look constrain up angle (when looking up, normally 90 degrees)
float32 Nytro::Scene::Camera::getNearPlane (  ) 
Returns:
camera near plane (usually ~1.0f)
Matrix& Nytro::Scene::Camera::getProjectionMatrix (  ) 
Returns:
camera projection matrix
ECameraProjection Nytro::Scene::Camera::getProjectionType (  ) 
Returns:
camera projection type,
bool Nytro::Scene::Camera::isLookLimitAnglesEnabled (  ) 
Returns:
true if limit up and down look angle is enabled
bool Nytro::Scene::Camera::isUsingFixedYawAxis (  ) 
Returns:
if using the fixed yaw axis
void Nytro::Scene::Camera::lookTowards ( Vector3D rValue  )  [virtual]

look towards a specific point in space (world space)

Reimplemented from Nytro::Scene::SceneNode.

void Nytro::Scene::Camera::lookTowards ( float32  aX,
float32  aY,
float32  aZ 
) [virtual]

look towards a specific point in space (world space)

Reimplemented from Nytro::Scene::SceneNode.

Nytro::Scene::Camera::NYTRO_CLASS_NAME ( Camera   ) 
virtual void Nytro::Scene::Camera::prepare (  )  [virtual]

prepare the camera for render

Reimplemented from Nytro::Scene::SceneNode.

virtual void Nytro::Scene::Camera::relativeMove ( Vector3D rDelta  )  [virtual]

move the camera on local frame, Z is the forward/backward amount, Y is up/down, X is left/right strafe

void Nytro::Scene::Camera::setAspectRatio ( float32  aValue  ) 

set the camera aspect ratio

void Nytro::Scene::Camera::setCameraMatrix ( Matrix rValue  ) 

set the camera matrix

void Nytro::Scene::Camera::setFarPlane ( float32  aValue  ) 

set the camera far clipping plane distance

void Nytro::Scene::Camera::setFixedYawAxis ( Vector3D rAxis  ) 

set the fixed yaw axis

void Nytro::Scene::Camera::setFov ( float32  aValue  ) 

set the camera Field Of View

void Nytro::Scene::Camera::setLookDownLimitAngle ( float32  aValue  ) 

set the camera contrain down angle, when looking down

void Nytro::Scene::Camera::setLookLimitAngles ( bool  bValue  ) 

enable or disable the look up and down limit angles

void Nytro::Scene::Camera::setLookUpLimitAngle ( float32  aValue  ) 

set the camera contrain up angle, when looking up

void Nytro::Scene::Camera::setNearPlane ( float32  aValue  ) 

set the camera near clipping plane distance

void Nytro::Scene::Camera::setProjectionMatrix ( Matrix rValue  ) 

set the camera projection matrix

void Nytro::Scene::Camera::setProjectionType ( ECameraProjection  aValue  ) 

set the camera projection type

void Nytro::Scene::Camera::setUseFixedYawAxis ( bool  bUse  ) 

set to use the fixed yaw axis

virtual void Nytro::Scene::Camera::use (  )  [virtual]

use the camera, by setting camera view matrices


Field Documentation

Definition at line 127 of file nyCamera.h.

Definition at line 134 of file nyCamera.h.

Definition at line 134 of file nyCamera.h.

Definition at line 130 of file nyCamera.h.

Definition at line 127 of file nyCamera.h.

Definition at line 133 of file nyCamera.h.

Definition at line 127 of file nyCamera.h.

Definition at line 131 of file nyCamera.h.

Definition at line 132 of file nyCamera.h.

Definition at line 132 of file nyCamera.h.

Definition at line 127 of file nyCamera.h.

Definition at line 130 of file nyCamera.h.

Definition at line 129 of file nyCamera.h.

Definition at line 133 of file nyCamera.h.

Reimplemented from Nytro::Scene::SceneNode.

Definition at line 123 of file nyCamera.h.


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

© Copyright 7thFACTOR Entertainment - All rights reserved