#include <simulation.h>
Collaboration diagram for Simulation:

|
|
Definition at line 19 of file simulation.cpp. References activeObserver, and observers. 00019 : 00020 realTime(0.0), 00021 timeScale(1.0), 00022 syncTime(true), 00023 universe(_universe), 00024 closestSolarSystem(NULL), 00025 selection(), 00026 faintestVisible(5.0f) 00027 { 00028 activeObserver = new Observer(); 00029 observers.insert(observers.end(), activeObserver); 00030 }
|
|
|
Definition at line 33 of file simulation.cpp. References observers. 00034 {
00035 for (vector<Observer*>::iterator iter = observers.begin();
00036 iter != observers.end(); iter++)
00037 {
00038 delete *iter;
00039 }
00040 }
|
|
|
Definition at line 184 of file simulation.cpp. References observers. Referenced by CelestiaCore::splitView(). 00185 {
00186 Observer* o = new Observer();
00187 observers.insert(observers.end(), o);
00188 return o;
00189 }
|
|
|
Definition at line 339 of file simulation.cpp. References activeObserver, and Observer::cancelMotion(). Referenced by CelestiaCore::activateFavorite(). 00340 {
00341 activeObserver->cancelMotion();
00342 }
|
|
|
Definition at line 344 of file simulation.cpp. References activeObserver, Observer::centerSelection(), and selection. Referenced by CelestiaCore::charEntered(), and CelestiaCore::mouseButtonUp(). 00345 {
00346 activeObserver->centerSelection(selection, centerTime);
00347 }
|
|
|
Definition at line 349 of file simulation.cpp. References activeObserver, Observer::centerSelectionCO(), and selection. Referenced by CelestiaCore::charEntered(). 00350 {
00351 activeObserver->centerSelectionCO(selection, centerTime);
00352 }
|
|
|
Definition at line 267 of file simulation.cpp. References activeObserver, Observer::changeOrbitDistance(), and selection. Referenced by CelestiaCore::mouseMove(), and CelestiaCore::tick(). 00268 {
00269 activeObserver->changeOrbitDistance(selection, d);
00270 }
|
|
|
Definition at line 369 of file simulation.cpp. References activeObserver, Observer::chase(), and selection. Referenced by CelestiaCore::charEntered(). 00370 {
00371 activeObserver->chase(selection);
00372 }
|
|
||||||||||||
|
Definition at line 419 of file simulation.cpp. References closestSolarSystem, Selection::empty(), Universe::find(), SolarSystem::getStar(), selection, and universe. Referenced by FindObjectProc(). 00420 {
00421 Selection path[2];
00422 int nPathEntries = 0;
00423
00424 if (!selection.empty())
00425 path[nPathEntries++] = selection;
00426
00427 if (closestSolarSystem != NULL)
00428 path[nPathEntries++] = Selection(closestSolarSystem->getStar());
00429
00430 return universe->find(s, path, nPathEntries, i18n);
00431 }
|
|
||||||||||||
|
Definition at line 437 of file simulation.cpp. References closestSolarSystem, Selection::empty(), Universe::findPath(), SolarSystem::getStar(), selection, and universe. Referenced by CelestiaCore::activateFavorite(), celestia_find(), CelestiaCore::charEntered(), Url::goTo(), EclipseFinderDlg::gotoEclipse(), GotoObject(), GotoObjectProc(), LongLatDialog::slotApply(), CelestialBrowser::slotRightClickOnStar(), TourGuideGoto(), TourGuideProc(), and Url::Url(). 00438 {
00439 Selection path[2];
00440 int nPathEntries = 0;
00441
00442 if (!selection.empty())
00443 path[nPathEntries++] = selection;
00444
00445 if (closestSolarSystem != NULL)
00446 path[nPathEntries++] = Selection(closestSolarSystem->getStar());
00447
00448 return universe->findPath(s, path, nPathEntries, i18n);
00449 }
|
|
|
Definition at line 354 of file simulation.cpp. References activeObserver, Observer::follow(), and selection. Referenced by CelestiaCore::charEntered(), GotoObject(), LongLatDialog::slotApply(), TourGuideGoto(), and TourGuideProc(). 00355 {
00356 activeObserver->follow(selection);
00357 }
|
|
|
Definition at line 359 of file simulation.cpp. References activeObserver, Observer::geosynchronousFollow(), and selection. Referenced by CelestiaCore::charEntered(), and GotoObjectProc(). 00360 {
00361 activeObserver->geosynchronousFollow(selection);
00362 }
|
|
|
|
Definition at line 108 of file simulation.cpp. References activeObserver, and Observer::getArrivalTime(). Referenced by CelestiaCore::renderOverlay(). 00109 {
00110 return activeObserver->getArrivalTime();
00111 }
|
|
|
Definition at line 509 of file simulation.cpp. References faintestVisible. Referenced by celestia_getfaintestvisible(), CelestiaCore::charEntered(), GetCurrentPreferences(), KdePreferencesDialog::KdePreferencesDialog(), CelestiaCore::mouseMove(), KdeApp::queryExit(), and KdePreferencesDialog::slotApply(). 00510 {
00511 return faintestVisible;
00512 }
|
|
|
Definition at line 246 of file simulation.cpp. References activeObserver, and Observer::getFrame(). Referenced by CelestiaCore::addFavorite(), CelestiaCore::charEntered(), CelestiaCore::renderOverlay(), CelestiaCore::tick(), and Url::Url(). 00247 {
00248 return activeObserver->getFrame();
00249 }
|
|
|
Definition at line 521 of file simulation.cpp. References closestSolarSystem. Referenced by EclipseFinder::CalculateEclipses(), and SolarSystemBrowserProc(). 00522 {
00523 return closestSolarSystem;
00524 }
|
|
||||||||||||
|
Definition at line 452 of file simulation.cpp. References closestSolarSystem, Selection::empty(), Universe::getCompletionPath(), Location::getParentBody(), Universe::getSolarSystem(), SolarSystem::getStar(), Selection::getType(), Selection::location(), selection, and universe. Referenced by CelestiaCore::charEntered(). 00453 {
00454 Selection path[2];
00455 int nPathEntries = 0;
00456
00457 if (!selection.empty()) {
00458 if (selection.getType() == Selection::Type_Location)
00459 {
00460 path[nPathEntries++] = Selection(selection.location()->getParentBody());
00461 }
00462 else
00463 {
00464 path[nPathEntries++] = selection;
00465 }
00466 }
00467
00468 if (closestSolarSystem != NULL &&
00469 closestSolarSystem != universe->getSolarSystem(selection))
00470 {
00471 path[nPathEntries++] = Selection(closestSolarSystem->getStar());
00472 }
00473
00474 return universe->getCompletionPath(s, path, nPathEntries, withLocations);
00475 }
|
|
|
Definition at line 178 of file simulation.cpp. References activeObserver. Referenced by CelestiaCore::addFavorite(), CelestiaCore::charEntered(), SelectionPopup::init(), KdePreferencesDialog::KdePreferencesDialog(), KdePreferencesDialog::ltSubstract(), CelestiaCore::mouseMove(), StarBrowser::refresh(), RefreshItems(), CelestiaCore::renderOverlay(), CelestialBrowser::slotRefresh(), StarBrowser::StarBrowser(), CelestiaCore::tick(), and Url::Url(). 00179 {
00180 return *activeObserver;
00181 }
|
|
|
Definition at line 225 of file simulation.cpp. References activeObserver, and Observer::getMode(). Referenced by CelestiaCore::charEntered(), and CelestiaCore::renderOverlay(). 00226 {
00227 return activeObserver->getMode();
00228 }
|
|
|
Definition at line 102 of file simulation.cpp. References realTime. Referenced by CelestiaCore::renderOverlay(). 00103 {
00104 return realTime;
00105 }
|
|
|
Definition at line 130 of file simulation.cpp. References selection. Referenced by CelestiaCore::activateFavorite(), AddBookmarkProc(), CelestiaCore::addFavorite(), celestia_getselection(), CelestiaCore::charEntered(), GotoObjectProc(), handleContextPlanet(), handleContextSurface(), KdePreferencesDialog::KdePreferencesDialog(), LongLatDialog::LongLatDialog(), KdePreferencesDialog::ltSubstract(), MainWindowProc(), menuMark(), menuUnMark(), CelestiaCore::mouseButtonUp(), CelestiaCore::mouseMove(), CelestiaCore::renderOverlay(), and Url::Url(). 00131 {
00132 return selection;
00133 }
|
|
||||||||||||||||
|
Definition at line 325 of file simulation.cpp. References activeObserver, distance(), Observer::getSelectionLongLat(), and selection. Referenced by GotoObjectProc(), LongLatDialog::LongLatDialog(), and Url::Url(). 00328 {
00329 activeObserver->getSelectionLongLat(selection, distance, longitude, latitude);
00330 }
|
|
|
|
|
|
Definition at line 488 of file simulation.cpp. References syncTime. Referenced by KdeApp::initActions(), MainWindowProc(), KdeApp::queryExit(), KdeApp::slotToggleSyncTime(), and syncMenusWithRendererState(). 00489 {
00490 return syncTime;
00491 }
|
|
|
Definition at line 278 of file simulation.cpp. References activeObserver, and Observer::getTargetSpeed(). Referenced by CelestiaCore::charEntered(), CelestiaCore::keyDown(), KdePreferencesDialog::ltSubstract(), CelestiaCore::renderOverlay(), and CelestiaCore::tick(). 00279 {
00280 return activeObserver->getTargetSpeed();
00281 }
|
|
|
Definition at line 78 of file simulation.cpp. References activeObserver, and Observer::getTime(). Referenced by CelestiaCore::addFavorite(), celestia_gettime(), CelestiaCore::charEntered(), EclipseFinderDlg::EclipseFinderDlg(), EclipseFinderProc(), frame_from(), frame_to(), SetTimeDialog::init(), SelectionPopup::init(), KdePreferencesDialog::KdePreferencesDialog(), CelestiaCore::mouseMove(), object_getposition(), CelestiaCore::renderOverlay(), CelestiaCore::setLightTravelDelay(), CelestialBrowser::slotRefresh(), CelestiaCore::tick(), and Url::Url(). 00079 {
00080 return activeObserver->getTime();
00081 }
|
|
|
Definition at line 478 of file simulation.cpp. References timeScale. Referenced by CelestiaCore::back(), celestia_gettimescale(), CelestiaCore::forward(), CelestiaCore::goToUrl(), and Url::Url(). 00479 {
00480 return timeScale;
00481 }
|
|
|
Definition at line 151 of file simulation.cpp. References activeObserver, and Observer::getTrackedObject(). Referenced by CelestiaCore::charEntered(), CelestiaCore::renderOverlay(), and Url::Url(). 00152 {
00153 return activeObserver->getTrackedObject();
00154 }
|
|
|
Definition at line 71 of file simulation.cpp. References universe. Referenced by celestia_getstar(), celestia_getstarcount(), celestia_mark(), celestia_unmark(), celestia_unmarkall(), CelestiaCore::charEntered(), SelectionPopup::getSelectionFromId(), Url::getSelectionName(), SelectionPopup::getSelectionName(), handlePopupMenu(), SelectionPopup::init(), SelectionPopup::insert(), StarBrowser::listStars(), MainWindowProc(), menuContext(), menuMark(), menuUnMark(), StarBrowser::nearestStar(), object_getchildren(), object_mark(), object_unmark(), SelectionPopup::process(), CelestiaCore::renderOverlay(), and CelestialBrowser::slotRefresh(). 00072 {
00073 return universe;
00074 }
|
|
||||||||||||
|
Definition at line 318 of file simulation.cpp. References activeObserver, and Observer::gotoLocation(). Referenced by EclipseFinderProc(), eclipseGoto(), and EclipseFinderDlg::gotoEclipse(). 00320 {
00321 activeObserver->gotoLocation(transform, duration);
00322 }
|
|
||||||||||||||||||||
|
Definition at line 299 of file simulation.cpp. References activeObserver, distance(), Observer::gotoSelection(), and selection. 00303 {
00304 activeObserver->gotoSelection(selection, gotoTime, distance, up, upFrame);
00305 }
|
|
||||||||||||||||
|
Definition at line 283 of file simulation.cpp. References activeObserver, Selection::getType(), Observer::gotoSelection(), Observer::gotoSelectionGC(), and selection. Referenced by CelestiaCore::charEntered(), GotoObject(), GotoObjectProc(), TourGuideGoto(), and TourGuideProc(). 00286 {
00287 if (selection.getType() == Selection::Type_Location)
00288 {
00289 activeObserver->gotoSelectionGC(selection,
00290 gotoTime, 0.0, 0.5,
00291 up, upFrame);
00292 }
00293 else
00294 {
00295 activeObserver->gotoSelection(selection, gotoTime, up, upFrame);
00296 }
00297 }
|
|
||||||||||||||||||||||||
|
Definition at line 307 of file simulation.cpp. References activeObserver, distance(), Observer::gotoSelectionLongLat(), and selection. Referenced by Url::goTo(), GotoObject(), GotoObjectProc(), and LongLatDialog::slotApply(). 00312 {
00313 activeObserver->gotoSelectionLongLat(selection, gotoTime, distance,
00314 longitude, latitude, up);
00315 }
|
|
|
Definition at line 333 of file simulation.cpp. References activeObserver, Observer::gotoSurface(), and selection. Referenced by CelestiaCore::charEntered(). 00334 {
00335 activeObserver->gotoSurface(selection, duration);
00336 };
|
|
|
Definition at line 259 of file simulation.cpp. References activeObserver, Observer::orbit(), and selection. Referenced by CelestiaCore::mouseMove(), and CelestiaCore::tick(). 00260 {
00261 activeObserver->orbit(selection, q);
00262 }
|
|
|
Definition at line 364 of file simulation.cpp. References activeObserver, Observer::phaseLock(), and selection. Referenced by CelestiaCore::charEntered(). 00365 {
00366 activeObserver->phaseLock(selection);
00367 }
|
|
||||||||||||
|
Definition at line 163 of file simulation.cpp. References activeObserver, faintestVisible, Observer::getOrientation(), Observer::getPosition(), Observer::getTime(), Universe::pick(), Quaternion< T >::toMatrix4(), and universe. Referenced by CelestiaCore::mouseButtonUp(). 00164 {
00165 return universe->pick(activeObserver->getPosition(),
00166 pickRay * activeObserver->getOrientation().toMatrix4(),
00167 activeObserver->getTime(),
00168 faintestVisible,
00169 tolerance);
00170 }
|
|
|
Definition at line 192 of file simulation.cpp. References observers. Referenced by CelestiaCore::deleteView(), and CelestiaCore::singleView(). 00193 {
00194 vector<Observer*>::iterator iter = find(observers.begin(), observers.end(), o);
00195 if (iter != observers.end())
00196 observers.erase(iter);
00197 }
|
|
||||||||||||
|
Definition at line 62 of file simulation.cpp. References faintestVisible, selection, and universe. 00063 {
00064 renderer.render(observer,
00065 *universe,
00066 faintestVisible,
00067 selection);
00068 }
|
|
|
Definition at line 53 of file simulation.cpp. References activeObserver, faintestVisible, selection, and universe. Referenced by CelestiaCore::draw(). 00054 {
00055 renderer.render(*activeObserver,
00056 *universe,
00057 faintestVisible,
00058 selection);
00059 }
|
|
|
Definition at line 172 of file simulation.cpp. References activeObserver, and Observer::reverseOrientation(). Referenced by CelestiaCore::charEntered(). 00173 {
00174 activeObserver->reverseOrientation();
00175 }
|
|
|
Definition at line 252 of file simulation.cpp. References activeObserver, and Observer::rotate(). Referenced by CelestiaCore::mouseMove(). 00253 {
00254 activeObserver->rotate(q);
00255 }
|
|
|
Definition at line 379 of file simulation.cpp. References Selection::body(), closestSolarSystem, PlanetarySystem::getBody(), SolarSystem::getPlanets(), Universe::getSolarSystem(), PlanetarySystem::getStar(), getSun(), Body::getSystem(), Selection::getType(), selection, setSelection(), Selection::star(), and universe. Referenced by CelestiaCore::charEntered(), handleContextPlanet(), and MainWindowProc(). 00380 {
00381 if (index < 0)
00382 {
00383 if (selection.getType() == Selection::Type_Body)
00384 {
00385 PlanetarySystem* system = selection.body()->getSystem();
00386 if (system != NULL)
00387 setSelection(system->getStar());
00388 }
00389 }
00390 else
00391 {
00392 const Star* star = NULL;
00393 if (selection.getType() == Selection::Type_Star)
00394 star = selection.star();
00395 else if (selection.getType() == Selection::Type_Body)
00396 star = getSun(selection.body());
00397
00398 SolarSystem* solarSystem = NULL;
00399 if (star != NULL)
00400 solarSystem = universe->getSolarSystem(star);
00401 else
00402 solarSystem = closestSolarSystem;
00403
00404 if (solarSystem != NULL &&
00405 index < solarSystem->getPlanets()->getSystemSize())
00406 {
00407 setSelection(Selection(solarSystem->getPlanets()->getBody(index)));
00408 }
00409 }
00410 }
|
|
|
Definition at line 206 of file simulation.cpp. References activeObserver, and observers. Referenced by CelestiaCore::charEntered(), CelestiaCore::deleteView(), CelestiaCore::pickView(), and CelestiaCore::singleView(). 00207 {
00208 vector<Observer*>::iterator iter= find(observers.begin(), observers.end(), o);
00209 if (iter != observers.end())
00210 activeObserver = o;
00211 }
|
|
|
Definition at line 515 of file simulation.cpp. References faintestVisible. Referenced by CelestiaCore::initSimulation(), CelestiaCore::setFaintest(), CelestiaCore::setFaintestAutoMag(), KdePreferencesDialog::slotCancel(), KdeApp::slotFaintestVisible(), and WinMain(). 00516 {
00517 faintestVisible = magnitude;
00518 }
|
|
|
Definition at line 241 of file simulation.cpp. References activeObserver, and Observer::setFrame(). 00242 {
00243 activeObserver->setFrame(_frame);
00244 }
|
|
||||||||||||
|
Definition at line 235 of file simulation.cpp. References activeObserver, and Observer::setFrame(). Referenced by CelestiaCore::activateFavorite(), CelestiaCore::charEntered(), EclipseFinderProc(), eclipseGoto(), Url::goTo(), and EclipseFinderDlg::gotoEclipse(). 00237 {
00238 activeObserver->setFrame(FrameOfReference(coordSys, sel));
00239 }
|
|
|
Definition at line 230 of file simulation.cpp. References activeObserver, and Observer::setMode(). Referenced by CelestiaCore::charEntered(). 00231 {
00232 activeObserver->setMode(mode);
00233 }
|
|
|
Definition at line 219 of file simulation.cpp. References activeObserver, and Observer::setOrientation(). Referenced by CelestiaCore::activateFavorite(), and Url::goTo(). 00220 {
00221 activeObserver->setOrientation(orientation);
00222 }
|
|
|
Definition at line 214 of file simulation.cpp. References activeObserver, and Observer::setPosition(). Referenced by CelestiaCore::activateFavorite(), and Url::goTo(). 00215 {
00216 activeObserver->setPosition(pos);
00217 }
|
|
|
Definition at line 136 of file simulation.cpp. References Universe::markObject(), selection, universe, and Universe::unmarkObject(). Referenced by CelestiaCore::activateFavorite(), celestia_select(), CelestiaCore::charEntered(), FindObjectProc(), Url::goTo(), GotoObject(), GotoObjectProc(), handleContextPlanet(), handlePopupMenu(), MainWindowProc(), menuContext(), CelestiaCore::mouseButtonUp(), SelectionPopup::process(), selectPlanet(), LongLatDialog::slotApply(), SolarSystemBrowserProc(), StarBrowserProc(), TourGuideGoto(), and TourGuideProc(). 00137 {
00138 if (sel != selection)
00139 {
00140 universe->unmarkObject(selection, 0);
00141 selection = sel;
00142 universe->markObject(selection,
00143 10.0f,
00144 Color(1.0f, 0.0f, 0.0f, 0.9f),
00145 Marker::Diamond,
00146 0);
00147 }
00148 }
|
|
|
Definition at line 493 of file simulation.cpp. References syncTime. Referenced by KdeApp::initActions(), MainWindowProc(), and KdeApp::slotToggleSyncTime(). 00494 {
00495 syncTime = sync;
00496 }
|
|
|
Definition at line 273 of file simulation.cpp. References activeObserver, and Observer::setTargetSpeed(). Referenced by CelestiaCore::charEntered(), CelestiaCore::keyDown(), and CelestiaCore::tick(). 00274 {
00275 activeObserver->setTargetSpeed(s);
00276 }
|
|
|
Definition at line 84 of file simulation.cpp. References activeObserver, observers, Observer::setTime(), and syncTime. Referenced by CelestiaCore::activateFavorite(), celestia_settime(), CelestiaCore::charEntered(), SetTimeDialog::command(), EclipseFinderProc(), eclipseGoto(), Url::goTo(), EclipseFinderDlg::gotoEclipse(), CelestiaCore::setLightTravelDelay(), KdePreferencesDialog::slotApply(), KdeApp::slotSetTimeNow(), and CelestiaCore::start(). 00085 {
00086 if (syncTime)
00087 {
00088 for (vector<Observer*>::iterator iter = observers.begin();
00089 iter != observers.end(); iter++)
00090 {
00091 (*iter)->setTime(jd);
00092 }
00093 }
00094 else
00095 {
00096 activeObserver->setTime(jd);
00097 }
00098 }
|
|
|
Definition at line 483 of file simulation.cpp. References timeScale. Referenced by celestia_settimescale(), CelestiaCore::charEntered(), and Url::goTo(). 00484 {
00485 timeScale = _timeScale;
00486 }
|
|
|
Definition at line 157 of file simulation.cpp. References activeObserver, and Observer::setTrackedObject(). Referenced by CelestiaCore::charEntered(), and Url::goTo(). 00158 {
00159 activeObserver->setTrackedObject(sel);
00160 }
|
|
|
Definition at line 499 of file simulation.cpp. References activeObserver, Observer::getTime(), and observers. Referenced by MainWindowProc(). 00500 {
00501 for (vector<Observer*>::iterator iter = observers.begin();
00502 iter != observers.end(); iter++)
00503 {
00504 (*iter)->setTime(activeObserver->getTime());
00505 }
00506 }
|
|
|
Definition at line 115 of file simulation.cpp. References activeObserver, closestSolarSystem, Universe::getNearestSolarSystem(), Observer::getPosition(), observers, realTime, timeScale, universe, and Observer::update(). Referenced by EclipseFinderProc(), eclipseGoto(), Url::goTo(), EclipseFinderDlg::gotoEclipse(), KdePreferencesDialog::slotApply(), KdeApp::slotSetTimeNow(), CelestiaCore::start(), and CelestiaCore::tick(). 00116 {
00117 realTime += dt;
00118
00119 for (vector<Observer*>::iterator iter = observers.begin();
00120 iter != observers.end(); iter++)
00121 {
00122 (*iter)->update(dt, timeScale);
00123 }
00124
00125 // Find the closest solar system
00126 closestSolarSystem = universe->getNearestSolarSystem(activeObserver->getPosition());
00127 }
|
|
|
|
Definition at line 122 of file simulation.h. Referenced by findObject(), findObjectFromPath(), getNearestSolarSystem(), getObjectCompletion(), selectPlanet(), and update(). |
|
|
Definition at line 128 of file simulation.h. Referenced by getFaintestVisible(), pickObject(), render(), and setFaintestVisible(). |
|
|
Definition at line 126 of file simulation.h. Referenced by addObserver(), removeObserver(), setActiveObserver(), setTime(), Simulation(), synchronizeTime(), update(), and ~Simulation(). |
|
|
Definition at line 116 of file simulation.h. Referenced by getRealTime(), and update(). |
|
|
Definition at line 123 of file simulation.h. Referenced by centerSelection(), centerSelectionCO(), changeOrbitDistance(), chase(), findObject(), findObjectFromPath(), follow(), geosynchronousFollow(), getObjectCompletion(), getSelection(), getSelectionLongLat(), gotoSelection(), gotoSelectionLongLat(), gotoSurface(), orbit(), phaseLock(), render(), selectPlanet(), and setSelection(). |
|
|
Definition at line 118 of file simulation.h. Referenced by getSyncTime(), setSyncTime(), and setTime(). |
|
|
Definition at line 117 of file simulation.h. Referenced by getTimeScale(), setTimeScale(), and update(). |
|
|
Definition at line 120 of file simulation.h. Referenced by findObject(), findObjectFromPath(), getObjectCompletion(), getUniverse(), pickObject(), render(), selectPlanet(), setSelection(), and update(). |
1.4.1