-
Notifications
You must be signed in to change notification settings - Fork 0
Spacetime Class
Ludicrous edited this page Aug 9, 2022
·
1 revision
The spacetime class in G.R.M encapsulates all there is to a universe/spacetime.
-
ToCoordSystem(Vector4 spaceTime)
=> The coordinate transform from unity cartesian coordinates to your desired spacetime coordinates. -
ToCoordSystemVelocity(Vector4 spaceTimeVel, Vector4 cartesian)
=> The coordinate transform from cartesian velocity and position coordinates to your desired spacetime coordinates. -
GetMetric(Vector4 spaceTime)
=> The spacetime metric at a given spacetime coordinate, used to calculate all further properties and forms the foundation of your spacetime - your metre-stick and unit clock. -
FromCoordSystem(Vector4 coordSpace)
=> The coordinate transform to cartesian coordinates from your spacetime coordinates. Includes the temporal component. -
FromCoordSystemCart(Vector4 coordSpace)
=> The coordinate transform to unity cartesian coordinates from your spacetime coordinates.
Spacetimes should override DelPositionCoords(Vector4 del)
when using periodic coordinates (implemented to loop all values of a vector to reasonable values, illustrated below).
Note for all coordinate transformations: All coordinate systems are arbitrary, unity cartesian coordinates are used merely for simplicity and visualisation as Unity relies on cartesian coordinates for rendering.
- LateUpdate() => Implements pausing functionality.
- banParadoxes = true => Bans all causality paradoxes from happening by enforcing forward time progression, hence not recommended to turn off.
- tickmark = null => Used mostly for visualising an object's proper time. See here:
- speedOfLight = 30f => The global speed of light and causality. By convention, 1 time unit = i space units (c == 1) and this merely rescales space for a desired speed of light. Setting this too high results in çürséd newtonian mechanics.
- timestep = 1f => The global timestep used, inches all objects forward by a specified number of time units forwards in time, except in strange cases such as CTCs in Misner space.
- paused = false => Whether the simulation is paused or not.
List of Important Articles: