Public Member Functions | Protected Attributes

GCamera Class Reference

#include <GCamera.h>

Inheritance diagram for GCamera:
GObject

List of all members.

Public Member Functions

 GCamera (void)
 Clipping planes for frustum culling.
 ~GCamera (void)
 standard constructor
void queryCameraPosition (GVec4f *pos)
 standard destructor
void setCameraPosition (GVec4f pos)
 query the cameras position
int setRotation (GVec4f _rotation)
 set the cameras position
int queryRotation (GVec4f *_rotation)
 set the cameras rotation
int rotate (float angleX, float angleY, float angleZ=0.0f)
 query the cameras rotation
void translate (GVec4f delta)
 rotate camera
int move (float x, float y, float z, float speed)
 translate camera
int RecalculateMatrix (void)
 move camera
GMatrix16GetViewMatrix (int FLAGS=0)
 recalculate camera matrix
GMatrix16GetProjectionMatrix ()
 obtain pointer to generated view matrix
GMatrix16GetOrthoMatrix ()
 obtain pointer to generated projection matrix
int CreatePerspectiveProjectionMatrix (float fov, float aspect, float znear, float zfar)
 obtain pointer to generated orthographic matrix
int CreateOrthoProjectionMatrix (float left, float right, float bottom, float top, float znear, float zfar)
int GetCameraPickDirection (float x, float y, float z, GVec4f *origin, GMatrix16 *modelview, GVec4f *pickDir)
void setModelViewing (GModel *model, float distance)
void setWorldViewing ()
void ReAttachToModel ()
bool isModelViewing ()
int SetWorldMatrix (const GMatrix16 &world)
int SetupViewFrustum ()
bool SphereInside (GVec4f center, float radius)
virtual int Update (double time, double dtime)
 set the objects active state

Protected Attributes

GMatrix16 projection
GMatrix16 ortho
 projection matrix
GMatrix16 world
 ortho matrix
GVec4f position
 world matrix
GVec4f rotation
GMatrix16 transformations
 camera rotations
GMatrix16 transformations_inv
 camera transformation matrix
GMatrix16 transformations_translations
 camera transformation matrix
GMatrix16 transformations_translations_inv
 camera transformation matrix
GMatrix16 transformations_rotations
 camera transformation matrix
GMatrix16 transformations_rotations_inv
 camera transformation matrix
bool ismodelviewingcamera
 camera transformation matrix
float distance
 is the camera following a model?
GModelmodel
 distance from model
plane clipping [6]
 Model to follow.

Constructor & Destructor Documentation

GCamera::GCamera ( void   ) 

Clipping planes for frustum culling.

GCamera::~GCamera ( void   ) 

standard constructor


Member Function Documentation

int GCamera::CreateOrthoProjectionMatrix ( float  left,
float  right,
float  bottom,
float  top,
float  znear,
float  zfar 
)
int GCamera::CreatePerspectiveProjectionMatrix ( float  fov,
float  aspect,
float  znear,
float  zfar 
)

obtain pointer to generated orthographic matrix

int GCamera::GetCameraPickDirection ( float  x,
float  y,
float  z,
GVec4f origin,
GMatrix16 modelview,
GVec4f pickDir 
)
GMatrix16 * GCamera::GetOrthoMatrix (  ) 

obtain pointer to generated projection matrix

GMatrix16 * GCamera::GetProjectionMatrix (  ) 

obtain pointer to generated view matrix

GMatrix16 * GCamera::GetViewMatrix ( int  FLAGS = 0  ) 

recalculate camera matrix

bool GCamera::isModelViewing (  ) 
int GCamera::move ( float  x,
float  y,
float  z,
float  speed = 1 
)

translate camera

void GCamera::queryCameraPosition ( GVec4f pos  ) 

standard destructor

int GCamera::queryRotation ( GVec4f _rotation  ) 

set the cameras rotation

void GCamera::ReAttachToModel (  ) 
int GCamera::RecalculateMatrix ( void   ) 

move camera

int GCamera::rotate ( float  angleX,
float  angleY,
float  angleZ = 0.0f 
)

query the cameras rotation

void GCamera::setCameraPosition ( GVec4f  pos  ) 

query the cameras position

void GCamera::setModelViewing ( GModel model,
float  distance 
)
int GCamera::setRotation ( GVec4f  _rotation  ) 

set the cameras position

int GCamera::SetupViewFrustum (  ) 
int GCamera::SetWorldMatrix ( const GMatrix16 world  ) 
void GCamera::setWorldViewing (  ) 
bool GCamera::SphereInside ( GVec4f  center,
float  radius 
)
void GCamera::translate ( GVec4f  delta  ) 

rotate camera

int GCamera::Update ( double  time,
double  dtime 
) [virtual]

set the objects active state

Reimplemented from GObject.


Member Data Documentation

plane GCamera::clipping[6] [protected]

Model to follow.

float GCamera::distance [protected]

is the camera following a model?

camera transformation matrix

GModel* GCamera::model [protected]

distance from model

projection matrix

world matrix

camera rotations

camera transformation matrix

camera transformation matrix

camera transformation matrix

camera transformation matrix

camera transformation matrix

ortho matrix


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Enumerations Enumerator Friends Defines