EvEmu
0.8.4
11 September 2021
|
#include "SystemGPoint.h"
Public Member Functions | |
SystemGPoint.cpp | |
a group of methods and functions to get random points in a given solarsystem : Allan
| |
void | GetMoons (uint32 systemID) |
void | GetPlanets (uint32 systemID) |
uint32 | GetRandMoon (uint32 systemID) |
uint32 | GetRandPlanet (uint32 systemID) |
const GPoint | GetAnomalyPoint (SystemManager *pSys) |
const GPoint | Get2RandPlanets (uint32 systemID) |
const GPoint | Get3RandPlanets (uint32 systemID) |
const GPoint | GetRandPointOnMoon (uint32 systemID) |
const GPoint | GetRandPointOnPlanet (uint32 systemID) |
const GPoint | GetRandPointInSystem (uint32 systemID, int64 distance) |
Protected Attributes | |
SystemDB | m_db |
Definition at line 17 of file SystemGPoint.h.
Definition at line 114 of file SystemGPoint.cpp.
References SystemDB::GetPlanets(), m_db, and NULL_ORIGIN().
Definition at line 123 of file SystemGPoint.cpp.
References SystemDB::GetPlanets(), m_db, and NULL_ORIGIN().
const GPoint SystemGPoint::GetAnomalyPoint | ( | SystemManager * | pSys | ) |
Definition at line 152 of file SystemGPoint.cpp.
References SystemManager::GetID(), SystemDB::GetPlanets(), SystemManager::GetSE(), itemID(), m_db, MakeRandomInt(), GPoint::MakeRandomPointOnSphereLayer(), and ONE_AU_IN_METERS.
Referenced by AnomalyMgr::CreateAnomaly().
void SystemGPoint::GetMoons | ( | uint32 | systemID | ) |
Definition at line 68 of file SystemGPoint.cpp.
References SystemDB::GetMoons(), and m_db.
void SystemGPoint::GetPlanets | ( | uint32 | systemID | ) |
the purpose of this class is to have a common location with methods used to define random points in solar systems based on planet and moon positions. GetRandPointOnPlanet() will query solar systems for planets, pick a random planet, and define a coordnate within that planet's bubble. GetRandPointOnMoon() does same as above, but using moons. Get2RandPlanets() will pick a random point between 2 planets, for warp-out/warp-in and other things as we see fit. Get3RandPlanets() does same as above, but using 3 planets. GetRandPointInSystem() will define a random point within a given system.
this class of methods should be used for positioning mission space, cosmic signatures, anomolies, complexes, and other things needing a random position in a given system.
these methods will also be used for random npc spawns and their warping/movement.
class DBGPointEntity has index, itemID, radius, and position, and is found in SystemDB. see copy of class declaration below
NOTE i seem to remember that ALL COSMIC SPAWNS are within 6au from planets. ....cant find that info now. -allan 31Jul14int64 MakeRandomInt( int64 low, int64 high ) double MakeRandomFloat( double low, double high )
Definition at line 61 of file SystemGPoint.cpp.
References SystemDB::GetPlanets(), and m_db.
Definition at line 133 of file SystemGPoint.cpp.
References SystemDB::GetMoons(), m_db, and MakeRandomInt().
Definition at line 101 of file SystemGPoint.cpp.
References SystemDB::GetPlanets(), m_db, and MakeRandomInt().
Definition at line 146 of file SystemGPoint.cpp.
References NULL_ORIGIN().
Definition at line 88 of file SystemGPoint.cpp.
References SystemDB::GetMoons(), m_db, MakeRandomInt(), and NULL_ORIGIN().
Referenced by Command_tr(), and SystemManager::LoadPlayerDynamics().
Definition at line 75 of file SystemGPoint.cpp.
References SystemDB::GetPlanets(), m_db, MakeRandomInt(), and NULL_ORIGIN().
Referenced by BubbleManager::Add(), Command_tr(), SystemManager::LoadSystemDynamics(), and Client::SetDestiny().
|
protected |
Definition at line 31 of file SystemGPoint.h.
Referenced by Get2RandPlanets(), Get3RandPlanets(), GetAnomalyPoint(), GetMoons(), GetPlanets(), GetRandMoon(), GetRandPlanet(), GetRandPointOnMoon(), and GetRandPointOnPlanet().