#include <GCamera.h>
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 | |
GMatrix16 * | GetViewMatrix (int FLAGS=0) |
recalculate camera matrix | |
GMatrix16 * | GetProjectionMatrix () |
obtain pointer to generated view matrix | |
GMatrix16 * | GetOrthoMatrix () |
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? | |
GModel * | model |
distance from model | |
plane | clipping [6] |
Model to follow. |
GCamera::GCamera | ( | void | ) |
Clipping planes for frustum culling.
GCamera::~GCamera | ( | void | ) |
standard constructor
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.
plane GCamera::clipping[6] [protected] |
Model to follow.
float GCamera::distance [protected] |
is the camera following a model?
bool GCamera::ismodelviewingcamera [protected] |
camera transformation matrix
GModel* GCamera::model [protected] |
distance from model
GMatrix16 GCamera::ortho [protected] |
projection matrix
GVec4f GCamera::position [protected] |
world matrix
GMatrix16 GCamera::projection [protected] |
GVec4f GCamera::rotation [protected] |
GMatrix16 GCamera::transformations [protected] |
camera rotations
GMatrix16 GCamera::transformations_inv [protected] |
camera transformation matrix
GMatrix16 GCamera::transformations_rotations [protected] |
camera transformation matrix
GMatrix16 GCamera::transformations_rotations_inv [protected] |
camera transformation matrix
GMatrix16 GCamera::transformations_translations [protected] |
camera transformation matrix
GMatrix16 GCamera::transformations_translations_inv [protected] |
camera transformation matrix
GMatrix16 GCamera::world [protected] |
ortho matrix