vegastrike  0.5.1.r1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GameStarSystem Class Reference

#include <star_system.h>

Inheritance diagram for GameStarSystem:
StarSystem

Public Member Functions

virtual ~GameStarSystem ()
 
 GameStarSystem (const char *filename, const Vector &centr=Vector(0, 0, 0), const float timeofyear=0)
 
Background * getBackground ()
 
void activateLightMap (int stage=1)
 activates the light map texture More...
 
Texture * getLightMap ()
 
Terrain * getTerrain (unsigned int which)
 
unsigned int numTerrain ()
 activates the light map texture More...
 
ContinuousTerrain * getContTerrain (unsigned int which)
 
unsigned int numContTerrain ()
 
ClickList * getClickList ()
 Loads the star system from an XML file returns xy sorted bounding spheres of all units in current view. More...
 
void Draw (bool DrawCockpit=true)
 Adds to draw list Draws a frame of action, interpolating between physics frames. More...
 
void Update (float priority, bool executeDirector)
 update a simulation atom ExecuteDirector must be false if star system is just loaded before mission is loaded More...
 
void SwapIn ()
 re-enables the included lights and terrains More...
 
void SwapOut ()
 Disables included lights and terrains. More...
 
virtual void VolitalizeJumpAnimation (const int ani)
 
virtual void DoJumpingComeSightAndSound (Unit *un)
 
virtual int DoJumpingLeaveSightAndSound (Unit *un)
 
void createBackground (StarSystem::StarXML *xml)
 
- Public Member Functions inherited from StarSystem
 StarSystem ()
 
 StarSystem (const char *filename, const Vector &centroid=Vector(0, 0, 0), const float timeofyear=0)
 
virtual ~StarSystem ()
 
void SetZone (unsigned int zonenum)
 
unsigned int GetZone ()
 
virtual void AddMissileToQueue (class MissileEffect *)
 
virtual void UpdateMissiles ()
 
void UpdateUnitPhysics (bool firstframe)
 
void RequestPhysics (Unit *un, unsigned int queue)
 Requeues the unit so that it is simulated ASAP. More...
 
void Update (float priority, bool executeDirector)
 update a simulation atom ExecuteDirector must be false if star system is just loaded before mission is loaded More...
 
void Update (float priority)
 
unsigned int getCurrentSimFrame () const
 Gets the current simulation frame. More...
 
void ExecuteUnitAI ()
 
std::string getFileName () const
 
std::string getName ()
 
UnitCollection & getUnitList ()
 Loads the star system from an XML file. More...
 
UnitCollection & gravitationalUnits ()
 
Unit * nextSignificantUnit ()
 
void AddUnit (Unit *unit)
 
returns xy sorted bounding spheres of all units in current view

Adds to draw list More...

 
bool RemoveUnit (Unit *unit)
 Removes from draw list. More...
 
bool JumpTo (Unit *unit, Unit *jumppoint, const std::string &system, bool force=false, bool save_coordinates=false)
 

Static Public Member Functions

static void DrawJumpStars ()
 
- Static Public Member Functions inherited from StarSystem
static void beginElement (void *userData, const XML_Char *name, const XML_Char **atts)
 
static void endElement (void *userData, const XML_Char *name)
 
static void ProcessPendingJumps ()
 

Friends

class Atmosphere
 

Additional Inherited Members

- Public Attributes inherited from StarSystem
struct StarSystem::Statistics stats
 
std::multimap< Unit *, Unit * > last_collisions
 
class CollideTable * collidetable
 
CollideMap * collidemap [2]
 
class bolt_draw * bolts
 
- Protected Types inherited from StarSystem
enum  PHYSICS_STAGE { MISSION_SIMULATION, PROCESS_UNIT, PHY_NUM }
 Physics is divided into 3 stages spread over 3 frames. More...
 
- Protected Member Functions inherited from StarSystem
void LoadXML (const char *, const Vector &centroid, const float timeofyear)
 
void beginElement (const std::string &name, const AttributeList &attributes)
 
void endElement (const std::string &name)
 
void AddStarsystemToUniverse (const std::string &filename)
 The Light Map corresponding for the BP for spheremapping. More...
 
void RemoveStarsystemFromUniverse ()
 
- Protected Attributes inherited from StarSystem
struct StarSystem::StarXMLxml
 
enum StarSystem::PHYSICS_STAGE current_stage
 
std::vector< Terrain * > terrains
 Stars, planets, etc. Orbital mechanics precalculated. More...
 
std::vector< ContinuousTerrain * > contterrains
 
UnitCollection drawList
 Everything to be drawn. Folded missiles in here oneday. More...
 
UnitCollection GravitationalUnits
 
UnitCollection physics_buffer [SIM_QUEUE_SIZE+1]
 
unsigned int current_sim_location
 
unsigned char no_collision_time
 Objects subject to global gravitron physics (disabled) More...
 
char * name
 system name More...
 
std::string filename
 
un_iter sigIter
 
double time
 to track the next given physics frame More...
 
Stars * stars
 The background associated with this system. More...
 
int lightcontext
 
std::vector< class
MissileEffect * > 
dischargedMissiles
 
unsigned int zone
 

Detailed Description

Star System Scene management for a star system Per-Frame Drawing & Physics simulation

Definition at line 21 of file star_system.h.

Constructor & Destructor Documentation

GameStarSystem::~GameStarSystem ( )
virtual

Definition at line 115 of file star_system.cpp.

GameStarSystem::GameStarSystem ( const char *  filename,
const Vector &  centr = Vector( 0, 0, 0 ),
const float  timeofyear = 0 
)

adds to jumping table;

Definition at line 46 of file star_system.cpp.

Member Function Documentation

void GameStarSystem::activateLightMap ( int  stage = 1)
virtual

activates the light map texture

Reimplemented from StarSystem.

Definition at line 95 of file star_system.cpp.

void GameStarSystem::createBackground ( StarSystem::StarXML xml)
virtual

Reimplemented from StarSystem.

Definition at line 422 of file star_system.cpp.

void GameStarSystem::DoJumpingComeSightAndSound ( Unit *  un)
virtual

Reimplemented from StarSystem.

Definition at line 124 of file star_system_jump.cpp.

int GameStarSystem::DoJumpingLeaveSightAndSound ( Unit *  un)
virtual

Reimplemented from StarSystem.

Definition at line 132 of file star_system_jump.cpp.

void GameStarSystem::Draw ( bool  DrawCockpit = true)
virtual

Adds to draw list Draws a frame of action, interpolating between physics frames.

this is the final, smoothly calculated cam

Reimplemented from StarSystem.

Definition at line 228 of file star_system.cpp.

void GameStarSystem::DrawJumpStars ( )
static

Definition at line 86 of file star_system_jump.cpp.

Background* GameStarSystem::getBackground ( )
inlinevirtual

Reimplemented from StarSystem.

Definition at line 36 of file star_system.h.

ClickList * GameStarSystem::getClickList ( )
virtual

Loads the star system from an XML file returns xy sorted bounding spheres of all units in current view.

Reimplemented from StarSystem.

Definition at line 138 of file star_system.cpp.

ContinuousTerrain* GameStarSystem::getContTerrain ( unsigned int  which)
inlinevirtual

Reimplemented from StarSystem.

Definition at line 52 of file star_system.h.

Texture * GameStarSystem::getLightMap ( )
virtual

Reimplemented from StarSystem.

Definition at line 90 of file star_system.cpp.

Terrain* GameStarSystem::getTerrain ( unsigned int  which)
inlinevirtual

Reimplemented from StarSystem.

Definition at line 44 of file star_system.h.

unsigned int GameStarSystem::numContTerrain ( )
inlinevirtual

Reimplemented from StarSystem.

Definition at line 56 of file star_system.h.

unsigned int GameStarSystem::numTerrain ( )
inlinevirtual

activates the light map texture

Reimplemented from StarSystem.

Definition at line 48 of file star_system.h.

void GameStarSystem::SwapIn ( )
virtual

re-enables the included lights and terrains

Reimplemented from StarSystem.

Definition at line 149 of file star_system.cpp.

void GameStarSystem::SwapOut ( )
virtual

Disables included lights and terrains.

Reimplemented from StarSystem.

Definition at line 154 of file star_system.cpp.

void GameStarSystem::Update ( float  priority,
bool  executeDirector 
)

update a simulation atom ExecuteDirector must be false if star system is just loaded before mission is loaded

void GameStarSystem::VolitalizeJumpAnimation ( const int  ani)
virtual

Reimplemented from StarSystem.

Definition at line 77 of file star_system_jump.cpp.

Friends And Related Function Documentation

friend class Atmosphere
friend

Definition at line 76 of file star_system.h.


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