Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

CSkyManager Class Reference

#include <Sky.h>

List of all members.

Public Member Functions

 CSkyManager (void)
 ~CSkyManager (void)
void Update (float dT)
void SetCamera (SPosition pos, SVector orient)
void PreDraw (void)
void Print (FILE *f)

Protected Attributes

ssgRoot * pre_root
ssgSelector * pre_selector
ssgTransform * pre_transform
CSkyLightskylight
CSkyDomeImagedomeimage
CStarImagesstarimage
CSolImagesolimage
CMoonImagemoonimage
CMercuryImagemercuryimage
CVenusImagevenusimage
CMarsImagemarsimage
CJupiterImagejupiterimage
CSaturnImagesaturnimage
CSolsol
CMoonmoon
CMercurymercury
CVenusvenus
CMarsmars
CJupiterjupiter
CSaturnsaturn
EDarkPhase old_phase
float effective_visibility
float skyDistance


Detailed Description

Definition at line 430 of file Sky.h.


Constructor & Destructor Documentation

CSkyManager::CSkyManager void   ) 
 

Todo:
Remove mask around SkyDome memory leaks

Todo:
Investigate Fly! II sun rendering in more detail, and/or research independent method for sun visualization

Definition at line 77 of file Sky.cpp.

References domeimage, effective_visibility, CSaturnImage::GetSSGEntity(), CJupiterImage::GetSSGEntity(), CMarsImage::GetSSGEntity(), CVenusImage::GetSSGEntity(), CMercuryImage::GetSSGEntity(), CStarImages::GetSSGEntity(), CSkyDomeImage::GetSSGEntity(), CSkyLight::Init(), jupiter, jupiterimage, mars, marsimage, mercury, mercuryimage, moon, moonimage, old_phase, PHASE_INVALID, PI, pre_root, pre_transform, CMoonImage::Repaint(), CSkyDomeImage::Repaint(), saturn, saturnimage, skyDistance, skylight, sol, starimage, venus, and venusimage.

CSkyManager::~CSkyManager void   ) 
 

Todo:
Resolve memory leak when sky dome kids are removed (assertion fail, invalid heap pointer?

Definition at line 169 of file Sky.cpp.

References domeimage, jupiter, jupiterimage, mars, marsimage, mercury, mercuryimage, moon, moonimage, pre_root, saturn, saturnimage, skylight, sol, starimage, venus, and venusimage.


Member Function Documentation

void CSkyManager::PreDraw void   ) 
 

Definition at line 431 of file Sky.cpp.

References pre_root.

Referenced by CSituation::Draw().

void CSkyManager::Print FILE *  f  ) 
 

Definition at line 447 of file Sky.cpp.

References SDateTime::date, SDate::day, domeimage, dt, FormatRADec(), CCelestialBody::GetDeclination(), CTimeManager::GetModifiedJulianDate(), CCelestialBody::GetRightAscension(), CTimeManager::GetUTCDateTime(), globals, STime::hour, jupiter, mars, mercury, STime::minute, SDate::month, moon, STime::msecs, pre_root, CSkyDomeImage::Print(), saturn, STime::second, sol, SDateTime::time, SGlobals::timemgr, venus, and SDate::year.

Referenced by debug_dump_sky_cb().

void CSkyManager::SetCamera SPosition  pos,
SVector  orient
 

Todo:
Calculate proper up vector

Definition at line 403 of file Sky.cpp.

References E, SVector::h, and SVector::p.

Referenced by CSituation::Draw().

void CSkyManager::Update float  dT  ) 
 

Todo:
Sun/moon positions only need to be recalculated infrequently, not on every update cycle
Todo:
Planet positions only need to be calculated once at situation star
Todo:
Orient moon towards sun using the 'spin' parameter

Definition at line 282 of file Sky.cpp.

References SPosition::alt, calc_zenith_azimuth_angles(), domeimage, GeodToCartesian(), CMoon::GetAge(), CCelestialBody::GetDeclination(), CTimeManager::GetLocalSiderealTime(), CCelestialBody::GetMagnitude(), CTimeManager::GetModifiedJulianDate(), CWorldObject::GetPosition(), CCelestialBody::GetRightAscension(), CSituation::GetUserVehicle(), globals, jupiter, jupiterimage, SPosition::lat, limitingMagnitude(), SPosition::lon, mars, marsimage, mercury, mercuryimage, moon, moonimage, pre_transform, CStarImages::Repaint(), CSaturnImage::Repaint(), CJupiterImage::Repaint(), CMarsImage::Repaint(), CVenusImage::Repaint(), CMercuryImage::Repaint(), CMoonImage::Repaint(), CSkyDomeImage::Repaint(), CStarImages::Reposition(), CSaturnImage::Reposition(), CJupiterImage::Reposition(), CMarsImage::Reposition(), CVenusImage::Reposition(), CMercuryImage::Reposition(), CMoonImage::Reposition(), CSkyDomeImage::Reposition(), saturn, saturnimage, SGlobals::sit, skyDistance, skylight, sol, starimage, SGlobals::timemgr, CSkyLight::Update(), CSaturn::UpdatePosition(), CJupiter::UpdatePosition(), CMars::UpdatePosition(), CVenus::UpdatePosition(), CMercury::UpdatePosition(), CMoon::UpdatePosition(), CSol::UpdatePosition(), venus, venusimage, SVector::x, SVector::y, and SVector::z.

Referenced by CSituation::Timeslice().


Member Data Documentation

CSkyDomeImage* CSkyManager::domeimage [protected]
 

Definition at line 451 of file Sky.h.

Referenced by CSkyManager(), Print(), Update(), and ~CSkyManager().

float CSkyManager::effective_visibility [protected]
 

Definition at line 474 of file Sky.h.

Referenced by CSkyManager().

CJupiter* CSkyManager::jupiter [protected]
 

Definition at line 467 of file Sky.h.

Referenced by CSkyManager(), Print(), Update(), and ~CSkyManager().

CJupiterImage* CSkyManager::jupiterimage [protected]
 

Definition at line 458 of file Sky.h.

Referenced by CSkyManager(), Update(), and ~CSkyManager().

CMars* CSkyManager::mars [protected]
 

Definition at line 466 of file Sky.h.

Referenced by CSkyManager(), Print(), Update(), and ~CSkyManager().

CMarsImage* CSkyManager::marsimage [protected]
 

Definition at line 457 of file Sky.h.

Referenced by CSkyManager(), Update(), and ~CSkyManager().

CMercury* CSkyManager::mercury [protected]
 

Definition at line 464 of file Sky.h.

Referenced by CSkyManager(), Print(), Update(), and ~CSkyManager().

CMercuryImage* CSkyManager::mercuryimage [protected]
 

Definition at line 455 of file Sky.h.

Referenced by CSkyManager(), Update(), and ~CSkyManager().

CMoon* CSkyManager::moon [protected]
 

Definition at line 463 of file Sky.h.

Referenced by CSkyManager(), Print(), Update(), and ~CSkyManager().

CMoonImage* CSkyManager::moonimage [protected]
 

Definition at line 454 of file Sky.h.

Referenced by CSkyManager(), Update(), and ~CSkyManager().

EDarkPhase CSkyManager::old_phase [protected]
 

Definition at line 471 of file Sky.h.

Referenced by CSkyManager().

ssgRoot* CSkyManager::pre_root [protected]
 

Definition at line 443 of file Sky.h.

Referenced by CSkyManager(), PreDraw(), Print(), and ~CSkyManager().

ssgSelector* CSkyManager::pre_selector [protected]
 

Definition at line 444 of file Sky.h.

ssgTransform* CSkyManager::pre_transform [protected]
 

Definition at line 445 of file Sky.h.

Referenced by CSkyManager(), and Update().

CSaturn* CSkyManager::saturn [protected]
 

Definition at line 468 of file Sky.h.

Referenced by CSkyManager(), Print(), Update(), and ~CSkyManager().

CSaturnImage* CSkyManager::saturnimage [protected]
 

Definition at line 459 of file Sky.h.

Referenced by CSkyManager(), Update(), and ~CSkyManager().

float CSkyManager::skyDistance [protected]
 

Definition at line 475 of file Sky.h.

Referenced by CSkyManager(), and Update().

CSkyLight* CSkyManager::skylight [protected]
 

Definition at line 448 of file Sky.h.

Referenced by CSkyManager(), Update(), and ~CSkyManager().

CSol* CSkyManager::sol [protected]
 

Definition at line 462 of file Sky.h.

Referenced by CSkyManager(), Print(), Update(), and ~CSkyManager().

CSolImage* CSkyManager::solimage [protected]
 

Definition at line 453 of file Sky.h.

CStarImages* CSkyManager::starimage [protected]
 

Definition at line 452 of file Sky.h.

Referenced by CSkyManager(), Update(), and ~CSkyManager().

CVenus* CSkyManager::venus [protected]
 

Definition at line 465 of file Sky.h.

Referenced by CSkyManager(), Print(), Update(), and ~CSkyManager().

CVenusImage* CSkyManager::venusimage [protected]
 

Definition at line 456 of file Sky.h.

Referenced by CSkyManager(), Update(), and ~CSkyManager().


The documentation for this class was generated from the following files:
SourceForge.net Logo Documentation generated by doxygen