|
override List< int > | Init () |
| Initialize the objects for this display controller. This is called by GSController init as part of its Start()
|
|
float float y | MapProject (double theta, double phiIn) |
|
override Vector3 | MapToScene (Vector3 rWorldAbs, double time) |
| Map from the world space to the display space:
|
|
void | ActiveSet (bool value) |
| Change the active status.
|
|
void | DisplayBodyRemoveByBodyId (int id) |
| Remove all GSDisplayObjects with the given bodyId.
|
|
delegate void | DisplayInScene (GECore ge, MapToSceneFn mapToScene, double timeWorld, bool alwaysUpdate=false, bool maintainCoRo=false) |
|
void | DisplayObjectAdd (GSDisplayObject gdo) |
| Add a GSDisplayObject (typically a GSDisplayBody or GSDisplayOrbit). Different display objects may have different update methods or choose to register custom display functions so they are asked to "add themselves" via AddToSceneDisplay(). As part of this they must call RegisterDisplayObject() [which is where the "book-keeping" is done.].
|
|
void | DisplayObjectRemove (GSDisplayObject gdo) |
| Remove a GSDisplayObject (e.g. GSDisplayBody, GSDisplayOrbit etc.)
|
|
virtual void | DisplayUpdate (GECore ge, double elapsedWorldTime) |
| Main update loop for display of bodies and orbits in the scene. (Internal)
|
|
string | DumpAll () |
|
delegate Vector3 | MapToSceneFn (Vector3 rWorld, double time=-1) |
|
void | ParticleSetup (double dt, double timeStart, GBUnits.GEScaler geScaler) |
|
void | ParticlesUpdate (double lenPhysToWorld) |
|
List< GSParticles > | ParticleSystems () |
|
int | RegisterDisplayObject (GSDisplayObject gdo, int bodyId, Transform transform=null, DisplayInScene displayInScene=null, bool trajectory=false, LineRenderer trajLine=null) |
|
void | UpdateDisplayObjectBody (long displayId, int bodyId) |
| Update the internal state of GSDisplayObject. Can be used to designate a new bodyId to track.
|
|
|
Vector3 | aboveMapOffset |
|
GSBody | centerBody |
|
LineRenderer | debug3060 |
|
bool | earthOffset |
|
float | height = 50.0f |
|
Vector3 | heightAxis = new Vector3(0, 0, 1) |
|
Vector3 | longitude0Axis = Vector3.right |
|
float | longitude0Deg = 0 |
|
float | width = 100.0f |
|
Vector3 | widthAxis = new Vector3(1, 0, 0) |
|
bool | active = true |
|
GSDisplayObject[] | addBodies |
|
AddMode | addMode = AddMode.CHILDREN |
|
CR3BP.ReferencePoint | cr3bpRefPoint = CR3BP.ReferencePoint.NONE |
|
DisplayMode | displayMode = DisplayMode.INTERPOLATE |
|
bool | editorScalingFoldout = false |
|
GSController | gsController |
|
bool | maintainCoRo = false |
|
float | maxSceneDimension = 10000 |
|
float | scale = 1.0f |
|
GSBody | wrtBody |
|
bool | xzOrbitPlane = true |
|
Display objects and trajectories on a map projection of a planet.
NOTE: to have the usual Cartesian X, Y plane need to have the camera located at -Z looking toward the origin, since Unity has a LH coordinate system.
override Vector3 GravityEngine2.GSMapDisplay.MapToScene |
( |
Vector3 | rWorld, |
|
|
double | time ) |
|
virtual |
Map from the world space to the display space:
- if XZ orbit mode, then flip YZ coords
- apply scale from world to display
- add position offset and rotation from the GSDisplay transform
Extensions of this class will commonly override this method to produce a different mapping e.g. GSDisplayMercator
Typically the time is not required, but some display controllers may elect to show things in a rotating frame and the time is needed in those cases.
- Parameters
-
rWorld | Position in world space and default world units |
time | world time for this point |
- Returns
Reimplemented from GravityEngine2.GSDisplay.
override void GravityEngine2.GSMapDisplay.TrajectoryUpdate |
( |
GECore | geTrajectory | ) |
|
|
protectedvirtual |
In a map display need to thread the trajectory under the map when we wrap off the edge (either horizontally or vertically). In this case we need to add more than one point for a given traj. point, hence the need to override the entire traj. update.
Since this is the only use case, C&P the common code for now.
- Parameters
-
Reimplemented from GravityEngine2.GSDisplay.