Class RelativisticEffectsManager

java.lang.Object
gaiasky.util.gravwaves.RelativisticEffectsManager
All Implemented Interfaces:
IObserver

public class RelativisticEffectsManager
extends java.lang.Object
implements IObserver
Central hub where the parameters of the current relativistic effects (aberration, doppler, grav waves) are updated and served to the renderers.
  • Field Summary

    Fields
    Modifier and Type Field Description
    com.badlogic.gdx.math.Vector3 gw
    Cartesian coordinates from the origin of the grav wave.
    com.badlogic.gdx.math.Matrix3 gwmat3
    Rotation of gw
    com.badlogic.gdx.math.Matrix4 gwmat4
    Rotation of gw
    float gwtime
    Time in seconds, synced to the simulation time.
    float[] hterms
    Hterms: hpluscos, hplussin, htimescos, htimessin
    float omgw
    Wave frequency
    float vc
    v/c
    com.badlogic.gdx.math.Vector3 velDir
    Camera velocity direction vector
  • Method Summary

    Modifier and Type Method Description
    static RelativisticEffectsManager getInstance()  
    Vector3d gravitationalWavePos​(Vector3d pos)
    Applies the gravitational wave transformation to the given position
    boolean gravWavesOn()  
    static void initialize​(ITimeFrameProvider time)  
    void notify​(Events event, java.lang.Object... data)  
    boolean relAberrationOn()  
    void update​(ITimeFrameProvider time, ICamera camera)
    This must be called every cycle, it updates the needed parameters for the gravitational waves

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • velDir

      public com.badlogic.gdx.math.Vector3 velDir
      Camera velocity direction vector
    • vc

      public float vc
      v/c
    • gw

      public com.badlogic.gdx.math.Vector3 gw
      Cartesian coordinates from the origin of the grav wave. Unit vector
    • gwmat3

      public com.badlogic.gdx.math.Matrix3 gwmat3
      Rotation of gw
    • gwmat4

      public com.badlogic.gdx.math.Matrix4 gwmat4
      Rotation of gw
    • gwtime

      public float gwtime
      Time in seconds, synced to the simulation time. Ready to pass to the shader
    • omgw

      public float omgw
      Wave frequency
    • hterms

      public float[] hterms
      Hterms: hpluscos, hplussin, htimescos, htimessin
  • Method Details

    • getInstance

      public static RelativisticEffectsManager getInstance()
    • initialize

      public static void initialize​(ITimeFrameProvider time)
    • relAberrationOn

      public boolean relAberrationOn()
    • gravWavesOn

      public boolean gravWavesOn()
    • update

      public void update​(ITimeFrameProvider time, ICamera camera)
      This must be called every cycle, it updates the needed parameters for the gravitational waves
      Parameters:
      time -
    • gravitationalWavePos

      public Vector3d gravitationalWavePos​(Vector3d pos)
      Applies the gravitational wave transformation to the given position
      Parameters:
      pos - The position for chaining
    • notify

      public void notify​(Events event, java.lang.Object... data)
      Specified by:
      notify in interface IObserver