Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Teddy::SpaceGame::ShipCamera Class Reference

Camera which is attached to a ship. More...

#include <ShipCamera.h>

Inheritance diagram for Teddy::SpaceGame::ShipCamera:

Inheritance graph
[legend]
Collaboration diagram for Teddy::SpaceGame::ShipCamera:

Collaboration graph
[legend]
List of all members.

Public Methods

 ShipCamera (Ship *ship, Scene *scene, Mesh *cabin=NULL)
 ShipCamera constructor. More...

virtual void projectScene (Projection *p)
void front ()
 Front view. More...

void left ()
 Left view. More...

void right ()
 Right view. More...

void rear ()
 Rear view. More...

void top ()
 Top view. More...

void bottom ()
 Bottom view. More...

void setCabin (Mesh *cabin_mesh)
 Set cabin object. More...

void setHeading (float heading)
 Set camera's heading. More...

void setPitch (float pitch)
 Set camera's pitch. More...

void setRoll (float roll)
 Set camera's roll. More...

void setDistance (float distance)
 Set camera's distance to target ship. More...

void setShip (Ship *target)
ShipgetShip ()
Scene * getScene ()
Mesh * getMesh ()
float getDistance ()
 Get camera's distance to target ship. More...

float getHeading ()
float getPitch ()
float getRoll ()
virtual void tick ()
 Simulate one tick. More...


Protected Attributes

Shipship
Mesh * cabin
float heading_v
float pitch_v
float roll_v
float range

Detailed Description

Camera which is attached to a ship.

Definition at line 45 of file ShipCamera.h.


Constructor & Destructor Documentation

Teddy::SpaceGame::ShipCamera::ShipCamera Ship   ship,
Scene *    scene,
Mesh *    cabin_mesh = NULL
 

ShipCamera constructor.

Parameters:
ship  The ship to/from which the camera initially looks
Scene  The scene in which the camera looks
cabin_mesh  Cabin mesh to be drawn if inside the ship

Definition at line 46 of file ShipCamera.cpp.

References cabin, front(), range, and ship.


Member Function Documentation

void Teddy::SpaceGame::ShipCamera::bottom  
 

Bottom view.

Definition at line 136 of file ShipCamera.cpp.

References setHeading(), setPitch(), and setRoll().

void Teddy::SpaceGame::ShipCamera::front  
 

Front view.

Definition at line 91 of file ShipCamera.cpp.

References setHeading(), setPitch(), and setRoll().

Referenced by ShipCamera().

float Teddy::SpaceGame::ShipCamera::getDistance  
 

Get camera's distance to target ship.

Definition at line 178 of file ShipCamera.cpp.

References range.

float Teddy::SpaceGame::ShipCamera::getHeading  
 

Definition at line 183 of file ShipCamera.cpp.

References heading_v.

Mesh * Teddy::SpaceGame::ShipCamera::getMesh  
 

Definition at line 213 of file ShipCamera.cpp.

References cabin.

float Teddy::SpaceGame::ShipCamera::getPitch  
 

Definition at line 188 of file ShipCamera.cpp.

References pitch_v.

float Teddy::SpaceGame::ShipCamera::getRoll  
 

Definition at line 193 of file ShipCamera.cpp.

References roll_v.

Scene * Teddy::SpaceGame::ShipCamera::getScene  
 

Definition at line 208 of file ShipCamera.cpp.

Ship * Teddy::SpaceGame::ShipCamera::getShip  
 

Definition at line 203 of file ShipCamera.cpp.

References ship.

void Teddy::SpaceGame::ShipCamera::left  
 

Left view.

Definition at line 100 of file ShipCamera.cpp.

References setHeading(), setPitch(), and setRoll().

void Teddy::SpaceGame::ShipCamera::projectScene Projection *    p [virtual]
 

Parameters:
p  Projection Area to which draw the scene
If distance to target ship is zero, the target ship is not drawn

Definition at line 62 of file ShipCamera.cpp.

References range, and ship.

void Teddy::SpaceGame::ShipCamera::rear  
 

Rear view.

Definition at line 118 of file ShipCamera.cpp.

References setHeading(), setPitch(), and setRoll().

void Teddy::SpaceGame::ShipCamera::right  
 

Right view.

Definition at line 109 of file ShipCamera.cpp.

References setHeading(), setPitch(), and setRoll().

void Teddy::SpaceGame::ShipCamera::setCabin Mesh *    cabin_mesh
 

Set cabin object.

Parameters:
cabin_mesh  Pointer to cabin object

Definition at line 148 of file ShipCamera.cpp.

References cabin.

void Teddy::SpaceGame::ShipCamera::setDistance float    distance
 

Set camera's distance to target ship.

Definition at line 154 of file ShipCamera.cpp.

References range.

void Teddy::SpaceGame::ShipCamera::setHeading float    heading
 

Set camera's heading.

Definition at line 160 of file ShipCamera.cpp.

References heading_v.

Referenced by bottom(), front(), left(), rear(), right(), and top().

void Teddy::SpaceGame::ShipCamera::setPitch float    pitch
 

Set camera's pitch.

Definition at line 166 of file ShipCamera.cpp.

References pitch_v.

Referenced by bottom(), front(), left(), rear(), right(), and top().

void Teddy::SpaceGame::ShipCamera::setRoll float    roll
 

Set camera's roll.

Definition at line 172 of file ShipCamera.cpp.

References roll_v.

Referenced by bottom(), front(), left(), rear(), right(), and top().

void Teddy::SpaceGame::ShipCamera::setShip Ship   target
 

Definition at line 198 of file ShipCamera.cpp.

References ship.

void Teddy::SpaceGame::ShipCamera::tick   [virtual]
 

Simulate one tick.

Reimplemented from Teddy::SpaceGame::Simulated.

Definition at line 77 of file ShipCamera.cpp.

References heading_v, pitch_v, range, roll_v, and ship.

void Teddy::SpaceGame::ShipCamera::top  
 

Top view.

Definition at line 127 of file ShipCamera.cpp.

References setHeading(), setPitch(), and setRoll().


Member Data Documentation

Mesh* Teddy::SpaceGame::ShipCamera::cabin [protected]
 

Definition at line 76 of file ShipCamera.h.

Referenced by getMesh(), setCabin(), and ShipCamera().

float Teddy::SpaceGame::ShipCamera::heading_v [protected]
 

Definition at line 77 of file ShipCamera.h.

Referenced by getHeading(), setHeading(), and tick().

float Teddy::SpaceGame::ShipCamera::pitch_v [protected]
 

Definition at line 78 of file ShipCamera.h.

Referenced by getPitch(), setPitch(), and tick().

float Teddy::SpaceGame::ShipCamera::range [protected]
 

Definition at line 80 of file ShipCamera.h.

Referenced by getDistance(), projectScene(), setDistance(), ShipCamera(), and tick().

float Teddy::SpaceGame::ShipCamera::roll_v [protected]
 

Definition at line 79 of file ShipCamera.h.

Referenced by getRoll(), setRoll(), and tick().

Ship* Teddy::SpaceGame::ShipCamera::ship [protected]
 

Definition at line 75 of file ShipCamera.h.

Referenced by getShip(), projectScene(), setShip(), ShipCamera(), and tick().


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