CCamera Class Reference

Used for the visualizer's camera base class. More...

#include <CCamera.H>

List of all members.

Public Member Functions

 CCamera ()
 New CCamera object.
void SetMoveBy (float move_by)
 Move by scale factor.
void SetCamera (float x, float y, float z, float xv, float yv, float zv, float xu, float yu, float zu)
 Used to set up a default camera position.
void Follow_Focus (float x, float y, float z)
 Set camera in focus mode at the specified location.
void Bot_Focus (float x, float y, float z)
 Set the camera to focus on the box which is at the specified position.
void Follow_Bot (float x, float y, float z)
 Set camera in follow bot mode.
void MoveCamera (float direction)
 Move the camera in the specified direction.
void UpdateCamera (float xDir, float yDir, float zDir, float dir)
 Update the camera position in the specified directions.
void StrafeCam (float direction)
 Make the camera perform a strafing maneuver.
void StrafeCam (float direction, float x, float y, float z)
void CalculateStrafe ()
 Calculates the strafing parameters?
void RotateCamera (float AngleDir, float xSpeed, float ySpeed, float zSpeed)
 Rotates the camera about the given angle.
void RotateByMouse (int mousePosX, int mousePosY, int midX, int midY)
 Rotate the camera from mouse dragging input.

Public Attributes

float xPos
 Camera position value.
float yPos
 Camera position value.
float zPos
 Camera position value.
float xView
 Camera lookat (view) value.
float yView
 Camera lookat (view) value.
float zView
 Camera lookat (view) value.
float xUp
 Up vector for camera.
float yUp
 Up vector for camera.
float zUp
 Up vector for camera.
float xStrafe
 Strafing direction.
float yStrafe
 Strafing direction.
float zStrafe
 Strafing direction.
float currentRotationAngle
 Keeps us from going too far up or down.
float prev_bot_x
 Previous bot location.
float prev_bot_y
 Previous bot location.
float prev_bot_z
 Previous bot location.
float desired_bot_x
 Desired bot location.
float desired_bot_y
 Desired bot location.
float desired_bot_z
 Desired bot location.
float m_move_by
 Move by scale factor.

Detailed Description

Used for the visualizer's camera base class.


Constructor & Destructor Documentation

CCamera::CCamera (  ) 

Member Function Documentation

void CCamera::Bot_Focus ( float  x,
float  y,
float  z 
)

Set the camera to focus on the box which is at the specified position.

Parameters:
x 
y 
z 

References xView, yView, and zView.

Referenced by cajun::simview_t::set_view().

void CCamera::CalculateStrafe (  ) 

Calculates the strafing parameters?

References xPos, xStrafe, xUp, xView, yPos, yStrafe, yUp, yView, zPos, zStrafe, zUp, and zView.

Referenced by StrafeCam().

void CCamera::Follow_Bot ( float  x,
float  y,
float  z 
)

Set camera in follow bot mode.

Parameters:
x New bot x location.
y New bot y location.
z New bot z location.

References prev_bot_x, prev_bot_y, prev_bot_z, xPos, yPos, and zPos.

Referenced by cajun::simview_t::set_view().

void CCamera::Follow_Focus ( float  x,
float  y,
float  z 
)

Set camera in focus mode at the specified location.

Parameters:
x 
y 
z 

References xView, yView, and zView.

void CCamera::MoveCamera ( float  direction  ) 

Move the camera in the specified direction.

Parameters:
direction I don't know what values should go here.

References m_move_by, UpdateCamera(), xPos, xView, yPos, yView, zPos, and zView.

Referenced by cajun::simview_t::simview_interface_t::pressControlKey().

void CCamera::RotateByMouse ( int  mousePosX,
int  mousePosY,
int  midX,
int  midY 
)

Rotate the camera from mouse dragging input.

Parameters:
mousePosX Mouse x position.
mousePosY Mouse y position.
midX The middle of the screen, x coord.
midY The middle of the screen, y coord.

References RotateCamera(), xPos, xUp, xView, yPos, yUp, yView, zPos, zUp, and zView.

Referenced by cajun::simview_t::simview_interface_t::mousemotionhandler().

void CCamera::RotateCamera ( float  AngleDir,
float  xSpeed,
float  ySpeed,
float  zSpeed 
)

Rotates the camera about the given angle.

Parameters:
AngleDir 
xSpeed 
ySpeed 
zSpeed 

References CQuaternion::Conjugate(), CQuaternion::Rotatef(), CQuaternion::w, CQuaternion::x, xPos, xView, CQuaternion::y, yPos, yView, CQuaternion::z, zPos, and zView.

Referenced by RotateByMouse().

void CCamera::SetCamera ( float  x,
float  y,
float  z,
float  xv,
float  yv,
float  zv,
float  xu,
float  yu,
float  zu 
)

Used to set up a default camera position.

Parameters:
x xPos.
y yPos.
z zPos.
xv xView.
yv yView.
zv zView.
xu xUp.
yu yUp.
zu zUp.

References xPos, xUp, xView, yPos, yUp, yView, zPos, zUp, and zView.

Referenced by cajun::simview_t::simview_t().

void CCamera::SetMoveBy ( float  move_by  ) 

Move by scale factor.

Parameters:
move_by The scale factor to use.

References m_move_by.

Referenced by cajun::simview_t::simview_t().

void CCamera::StrafeCam ( float  direction,
float  x,
float  y,
float  z 
)
void CCamera::StrafeCam ( float  direction  ) 

Make the camera perform a strafing maneuver.

Parameters:
direction Direction to strafe in - not sure what allowable values are though.

References CalculateStrafe(), m_move_by, UpdateCamera(), xStrafe, yStrafe, and zStrafe.

Referenced by cajun::simview_t::change_view(), and cajun::simview_t::simview_interface_t::pressControlKey().

void CCamera::UpdateCamera ( float  xDir,
float  yDir,
float  zDir,
float  dir 
)

Update the camera position in the specified directions.

Parameters:
xDir 
yDir 
zDir 
dir 

References xPos, xView, yPos, yView, zPos, and zView.

Referenced by cajun::simview_t::change_view(), MoveCamera(), cajun::simview_t::simview_interface_t::pressControlKey(), and StrafeCam().


Member Data Documentation

Keeps us from going too far up or down.

Desired bot location.

Desired bot location.

Desired bot location.

Move by scale factor.

Referenced by CCamera(), MoveCamera(), SetMoveBy(), and StrafeCam().

Previous bot location.

Referenced by CCamera(), and Follow_Bot().

Previous bot location.

Referenced by CCamera(), and Follow_Bot().

Previous bot location.

Referenced by CCamera(), and Follow_Bot().

Strafing direction.

Referenced by CalculateStrafe(), CCamera(), and StrafeCam().

float CCamera::xUp

Strafing direction.

Referenced by CalculateStrafe(), CCamera(), and StrafeCam().

float CCamera::yUp

Strafing direction.

Referenced by CalculateStrafe(), CCamera(), and StrafeCam().

float CCamera::zUp

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

Generated on Fri Apr 9 10:45:17 2010 for Visualizer by  doxygen 1.6.1