vegastrike
0.5.1.r1
|
#include <star_system_generic.h>
Classes | |
struct | StarXML |
Starsystem XML Struct For use with XML loading. More... | |
struct | Statistics |
Public Member Functions | |
StarSystem () | |
StarSystem (const char *filename, const Vector ¢roid=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... | |
virtual void | activateLightMap (int stage=1) |
virtual Texture * | getLightMap () |
virtual unsigned int | numTerrain () |
activates the light map texture More... | |
virtual unsigned int | numContTerrain () |
virtual void | Draw (bool DrawCockpit=true) |
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 | Update (float priority) |
virtual void | SwapIn () |
re-enables the included lights and terrains More... | |
virtual void | SwapOut () |
Disables included lights and terrains. More... | |
virtual Terrain * | getTerrain (unsigned int which) |
virtual ContinuousTerrain * | getContTerrain (unsigned int which) |
virtual Background * | getBackground () |
virtual ClickList * | getClickList () |
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) |
virtual void | VolitalizeJumpAnimation (const int ani) |
virtual void | DoJumpingComeSightAndSound (Unit *un) |
virtual int | DoJumpingLeaveSightAndSound (Unit *un) |
virtual void | createBackground (StarSystem::StarXML *xml) |
Static Public Member Functions | |
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 () |
Public Attributes | |
struct StarSystem::Statistics | stats |
std::multimap< Unit *, Unit * > | last_collisions |
class CollideTable * | collidetable |
CollideMap * | collidemap [2] |
class bolt_draw * | bolts |
Protected Types | |
enum | PHYSICS_STAGE { MISSION_SIMULATION, PROCESS_UNIT, PHY_NUM } |
Physics is divided into 3 stages spread over 3 frames. More... | |
Protected Member Functions | |
void | LoadXML (const char *, const Vector ¢roid, 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 | |
struct StarSystem::StarXML * | xml |
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 |
Friends | |
class | Universe |
Definition at line 53 of file star_system_generic.h.
|
protected |
Physics is divided into 3 stages spread over 3 frames.
Enumerator | |
---|---|
MISSION_SIMULATION | |
PROCESS_UNIT | |
PHY_NUM |
Definition at line 113 of file star_system_generic.h.
StarSystem::StarSystem | ( | ) |
adds to jumping table;
Definition at line 73 of file star_system_generic.cpp.
StarSystem::StarSystem | ( | const char * | filename, |
const Vector & | centroid = Vector( 0, 0, 0 ) , |
||
const float | timeofyear = 0 |
||
) |
adds to jumping table;
Definition at line 91 of file star_system_generic.cpp.
|
virtual |
Definition at line 117 of file star_system_generic.cpp.
|
inlinevirtual |
Reimplemented in GameStarSystem.
Definition at line 163 of file star_system_generic.h.
|
virtual |
|
protected |
The Light Map corresponding for the BP for spheremapping.
Definition at line 775 of file star_system_generic.cpp.
void StarSystem::AddUnit | ( | Unit * | unit) |
returns xy sorted bounding spheres of all units in current view
Adds to draw list
Definition at line 230 of file star_system_generic.cpp.
|
protected |
|
static |
Definition at line 209 of file star_system_generic.cpp.
|
inlinevirtual |
Reimplemented in GameStarSystem.
Definition at line 242 of file star_system_generic.h.
|
inlinevirtual |
Reimplemented in GameStarSystem.
Definition at line 236 of file star_system_generic.h.
|
inlinevirtual |
Reimplemented in GameStarSystem.
Definition at line 237 of file star_system_generic.h.
|
inlinevirtual |
Draws a frame of action, interpolating between physics frames.
Reimplemented in GameStarSystem.
Definition at line 178 of file star_system_generic.h.
|
protected |
|
static |
Definition at line 214 of file star_system_generic.cpp.
void StarSystem::ExecuteUnitAI | ( | ) |
Definition at line 300 of file star_system_generic.cpp.
|
inlinevirtual |
Reimplemented in GameStarSystem.
Definition at line 195 of file star_system_generic.h.
|
inlinevirtual |
Reimplemented in GameStarSystem.
Definition at line 199 of file star_system_generic.h.
|
inlinevirtual |
Reimplemented in GameStarSystem.
Definition at line 191 of file star_system_generic.h.
|
inline |
Gets the current simulation frame.
Definition at line 204 of file star_system_generic.h.
string StarSystem::getFileName | ( | ) | const |
Definition at line 220 of file star_system_generic.cpp.
|
inlinevirtual |
Reimplemented in GameStarSystem.
Definition at line 164 of file star_system_generic.h.
string StarSystem::getName | ( | ) |
Definition at line 225 of file star_system_generic.cpp.
|
inlinevirtual |
Reimplemented in GameStarSystem.
Definition at line 187 of file star_system_generic.h.
|
inline |
Loads the star system from an XML file.
Definition at line 219 of file star_system_generic.h.
|
inline |
Definition at line 153 of file star_system_generic.h.
|
inline |
Definition at line 223 of file star_system_generic.h.
bool StarSystem::JumpTo | ( | Unit * | unit, |
Unit * | jumppoint, | ||
const std::string & | system, | ||
bool | force = false , |
||
bool | save_coordinates = false |
||
) |
Definition at line 927 of file star_system_generic.cpp.
|
protected |
Definition at line 1498 of file star_system_xml.cpp.
Unit * StarSystem::nextSignificantUnit | ( | ) |
Definition at line 654 of file star_system_generic.cpp.
|
inlinevirtual |
Reimplemented in GameStarSystem.
Definition at line 173 of file star_system_generic.h.
|
inlinevirtual |
activates the light map texture
Reimplemented in GameStarSystem.
Definition at line 169 of file star_system_generic.h.
|
static |
Definition at line 804 of file star_system_generic.cpp.
|
protected |
Definition at line 780 of file star_system_generic.cpp.
bool StarSystem::RemoveUnit | ( | Unit * | unit) |
Removes from draw list.
Definition at line 258 of file star_system_generic.cpp.
void StarSystem::RequestPhysics | ( | Unit * | un, |
unsigned int | queue | ||
) |
Requeues the unit so that it is simulated ASAP.
Definition at line 484 of file star_system_generic.cpp.
|
inline |
Definition at line 149 of file star_system_generic.h.
|
inlinevirtual |
re-enables the included lights and terrains
Reimplemented in GameStarSystem.
Definition at line 184 of file star_system_generic.h.
|
inlinevirtual |
Disables included lights and terrains.
Reimplemented in GameStarSystem.
Definition at line 186 of file star_system_generic.h.
void StarSystem::Update | ( | float | priority, |
bool | executeDirector | ||
) |
update a simulation atom ExecuteDirector must be false if star system is just loaded before mission is loaded
this makes it so systems without players may be simulated less accurately
just be sure to restore this at the end
Definition at line 689 of file star_system_generic.cpp.
void StarSystem::Update | ( | float | priority) |
Definition at line 659 of file star_system_generic.cpp.
|
virtual |
void StarSystem::UpdateUnitPhysics | ( | bool | firstframe) |
Definition at line 498 of file star_system_generic.cpp.
|
inlinevirtual |
Reimplemented in GameStarSystem.
Definition at line 235 of file star_system_generic.h.
|
friend |
Definition at line 142 of file star_system_generic.h.
class bolt_draw* StarSystem::bolts |
Definition at line 213 of file star_system_generic.h.
CollideMap* StarSystem::collidemap[2] |
Definition at line 212 of file star_system_generic.h.
class CollideTable* StarSystem::collidetable |
Definition at line 210 of file star_system_generic.h.
|
protected |
Definition at line 120 of file star_system_generic.h.
|
protected |
Definition at line 125 of file star_system_generic.h.
|
protected |
|
protected |
Definition at line 144 of file star_system_generic.h.
|
protected |
Everything to be drawn. Folded missiles in here oneday.
Definition at line 122 of file star_system_generic.h.
|
protected |
Definition at line 130 of file star_system_generic.h.
|
protected |
Definition at line 123 of file star_system_generic.h.
std::multimap< Unit*, Unit* > StarSystem::last_collisions |
Definition at line 147 of file star_system_generic.h.
|
protected |
Definition at line 143 of file star_system_generic.h.
|
protected |
system name
Definition at line 129 of file star_system_generic.h.
|
protected |
Objects subject to global gravitron physics (disabled)
Definition at line 127 of file star_system_generic.h.
|
protected |
Definition at line 124 of file star_system_generic.h.
|
protected |
Definition at line 131 of file star_system_generic.h.
|
protected |
The background associated with this system.
The moving, fading stars
Definition at line 137 of file star_system_generic.h.
struct StarSystem::Statistics StarSystem::stats |
|
protected |
Stars, planets, etc. Orbital mechanics precalculated.
Definition at line 119 of file star_system_generic.h.
|
protected |
to track the next given physics frame
Definition at line 133 of file star_system_generic.h.
|
protected |
|
protected |
Definition at line 145 of file star_system_generic.h.