world::World Class Reference

World class defines the simulated world (excludes scene-graph). More...

#include <_src_world_world.hh>

List of all members.

Public Member Functions

 World (void)
 ~World ()
 DEF_GetInstance (World)
void Make (void)
WorldVertex GetPosition (void)
fp GetRadius (void)
BoxVolume GetVolume (void)
string GetName (void)
bool IfFlat (void)
bool IfLowAltitude (const WorldVertex &pos)
bool IfDownward (fp n)
bool IfUpward (fp n)
WorldVertex ComputeUpVector (const SphereVertex &sv)
WorldVertex ComputeUpVector (const WorldVertex &pos)
void RotateTangential (Object &object, const SphereVertex &sv)
const MatrixGetTangentMatrix (const SphereVertex &sv)

Public Attributes

CLASS_CONST int ALT_UP_DIR = 1
CLASS_CONST int ALT_DOWN_DIR = -1


Detailed Description

World class defines the simulated world (excludes scene-graph).

Historical notes: In previous versions, World served as a facade over the scene-graph, was the container of Objects, etc. World eventually grew too complex so much of its functionality was factored out to SceneGraph. Currently, World now only has this functionality:


Constructor & Destructor Documentation

world::World::World ( void   )  [inline]

world::World::~World (  )  [inline]


Member Function Documentation

world::World::DEF_GetInstance ( World   ) 

void world::World::Make ( void   ) 

WorldVertex world::World::GetPosition ( void   )  [inline]

fp world::World::GetRadius ( void   ) 

Get radius of World/Planet.

BoxVolume world::World::GetVolume ( void   ) 

Returns:
Volume of world in 3D space.

string world::World::GetName ( void   ) 

Returns:
Name of world.

bool world::World::IfFlat ( void   ) 

If the World is flat ;-) This is queried since FlatPlanet is deficient and some configuration is only applicable to FlatPlanet.

bool world::World::IfLowAltitude ( const WorldVertex &  pos  ) 

Returns:
True if position is approx at low altitude.

bool world::World::IfDownward ( fp  n  )  [inline]

bool world::World::IfUpward ( fp  n  )  [inline]

WorldVertex world::World::ComputeUpVector ( const SphereVertex &  sv  ) 

Compute a normalized "up vector" extending from a point on the world. A "down vector" can be computed by multipling by -1.0f.

WorldVertex world::World::ComputeUpVector ( const WorldVertex &  pos  ) 

Compute an "up vector" where a 3D vector is at.

void world::World::RotateTangential ( Object object,
const SphereVertex &  sv 
)

Orient an Object to be tangent to a point on the world (in case world is spherical).

const Matrix & world::World::GetTangentMatrix ( const SphereVertex &  sv  ) 

Compute a matrix that is tangent to a point on the world.


Member Data Documentation

CLASS_CONST int world::World::ALT_UP_DIR = 1

CLASS_CONST int world::World::ALT_DOWN_DIR = -1


The documentation for this class was generated from the following files:
Palomino Flight Simulator documents generated by doxygen 1.5.6 on Tue Sep 28 11:37:50 2010