Package gaiasky.util.gravwaves
Class RelativisticEffectsManager
java.lang.Object
gaiasky.util.gravwaves.RelativisticEffectsManager
- All Implemented Interfaces:
IObserver
Central hub where the parameters of the current relativistic
effects (aberration, doppler, grav waves) are updated and served to the renderers.
-
Field Summary
FieldsModifier and TypeFieldDescriptioncom.badlogic.gdx.math.Vector3Cartesian coordinates from the origin of the grav wave.com.badlogic.gdx.math.Matrix3Rotation of gwcom.badlogic.gdx.math.Matrix4Rotation of gwfloatTime in seconds, synced to the simulation time.float[]Hterms: hpluscos, hplussin, htimescos, htimessinfloatWave frequencyfloatv/ccom.badlogic.gdx.math.Vector3Camera velocity direction vector -
Method Summary
Modifier and TypeMethodDescriptionstatic RelativisticEffectsManagergravitationalWavePos(Vector3d pos)Applies the gravitational wave transformation to the given positionbooleanstatic voidinitialize(ITimeFrameProvider time)voidbooleanvoidupdate(ITimeFrameProvider time, ICamera camera)This must be called every cycle, it updates the needed parameters for the gravitational waves
-
Field Details
-
velDir
public com.badlogic.gdx.math.Vector3 velDirCamera velocity direction vector -
vc
public float vcv/c -
gw
public com.badlogic.gdx.math.Vector3 gwCartesian coordinates from the origin of the grav wave. Unit vector -
gwmat3
public com.badlogic.gdx.math.Matrix3 gwmat3Rotation of gw -
gwmat4
public com.badlogic.gdx.math.Matrix4 gwmat4Rotation of gw -
gwtime
public float gwtimeTime in seconds, synced to the simulation time. Ready to pass to the shader -
omgw
public float omgwWave frequency -
hterms
public float[] htermsHterms: hpluscos, hplussin, htimescos, htimessin
-
-
Method Details
-
getInstance
-
initialize
-
relAberrationOn
public boolean relAberrationOn() -
gravWavesOn
public boolean gravWavesOn() -
update
This must be called every cycle, it updates the needed parameters for the gravitational waves- Parameters:
time-
-
gravitationalWavePos
Applies the gravitational wave transformation to the given position- Parameters:
pos- The position for chaining
-
notify
-