Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members

peon::SceneCamera Class Reference

This object acts as a wrapper around modifying the view matrix of the scene (aka the view transformation stage of the pipeline). More...

#include <SceneCamera.h>

Inheritance diagram for peon::SceneCamera:

peon::ISceneObject peon::IUnknown List of all members.

Public Member Functions

 SceneCamera ()
 Constructor.
 ~SceneCamera ()
 Destructor.
void generateViewFrustum ()
 This method is responsible for capturing our current view frustum matrix and dumping the data into 6 planes that we can query.
bool isSphereInFrustum (float x, float y, float z, float fRadius)
 This method is responsible for testing if a sphere has hit a view frustum boundary.
void setPerspectiveProj (float fAspect, float z_min, float z_max)
 This method is responsible for setting the perspective matrix for our camera.
void setViewMatrix (Vector3 &vecEye, Vector3 &vecLookAt, Vector3 &vecUp)
 This method sets our camera viewpoint.
void rotateView (float X, float Y, float Z)
virtual void updateView ()
virtual void onMouseEvent (SDL_Event *pEvent)
 This method can be used to update the view matrix based on the mouse's motion (if need be).

Protected Attributes

Vector3 m_vecUp
 the "Up" vector
Vector3 m_vecLookAt
 the "LookAT" vector
Plane m_oFrustumPlanes [6]
 our six view frustum planes

Detailed Description

This object acts as a wrapper around modifying the view matrix of the scene (aka the view transformation stage of the pipeline).


Member Function Documentation

bool peon::SceneCamera::isSphereInFrustum float  x,
float  y,
float  z,
float  fRadius
 

This method is responsible for testing if a sphere has hit a view frustum boundary.

Parameters:
x - x position of the sphere
y - y position of the sphere
z - z position of the sphere
float - radius of the sphere
Returns:
bool - true if the sphere is inside the frustum

virtual void peon::SceneCamera::onMouseEvent SDL_Event *  pEvent  )  [virtual]
 

This method can be used to update the view matrix based on the mouse's motion (if need be).

Parameters:
pEvent - the SDL_Event structure containing the mouse events

void peon::SceneCamera::setPerspectiveProj float  fAspect,
float  z_min,
float  z_max
 

This method is responsible for setting the perspective matrix for our camera.

Parameters:
fAspect - the aspect ratio of the view
z_min - the minimum z-plane
z_max - the maximum z-plane

void peon::SceneCamera::setViewMatrix Vector3 vecEye,
Vector3 vecLookAt,
Vector3 vecUp
 

This method sets our camera viewpoint.

Parameters:
vecEye - Vector3 of the eye point
vecLookAt - Vector3 coordinates of where we're lookin
vecLookUp - Vector3 coordinates of the up direction


The documentation for this class was generated from the following file:
Generated on Thu Dec 1 01:55:41 2005 for Peon by  doxygen 1.4.1