Class ElementPositions

java.lang.Object
gaiasky.scene.system.render.draw.ElementPositions

public class ElementPositions extends Object
Computes the positions of an orbital elements group in double precision and writes them into the float buffer the vertex shader reads, advancing the eccentric anomaly from the previous frame.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    compile(Object[] src, int count)
    Prepares the given elements for fast evaluation.
    void
    compute(double tjd, float[] buf, int stride, int offset, int repeat, Matrix4D refSys, Vector3D dataPos, Matrix4D affine)
    Computes the position of every element at the given time, in internal units, and writes the camera-relative float position into the vertex (or instance) buffer in the same pass.
    void
    project(float[] buf, int stride, int offset, int repeat, Matrix4D refSys, Vector3D dataPos, Matrix4D affine)
    Rewrites the float positions from the dataset-frame positions found by the last call to
    invalid reference
    #compute(double, float[], int, int, int)
    .
    void
    Releases the state of this instance.

    Methods inherited from class Object

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

    • ElementPositions

      public ElementPositions()
  • Method Details

    • compile

      public void compile(Object[] src, int count)
      Prepares the given elements for fast evaluation. Must be called before
      invalid reference
      #compute(double, float[], int, int, int)
      .
    • compute

      public void compute(double tjd, float[] buf, int stride, int offset, int repeat, Matrix4D refSys, Vector3D dataPos, Matrix4D affine)
      Computes the position of every element at the given time, in internal units, and writes the camera-relative float position into the vertex (or instance) buffer in the same pass.
    • project

      public void project(float[] buf, int stride, int offset, int repeat, Matrix4D refSys, Vector3D dataPos, Matrix4D affine)
      Rewrites the float positions from the dataset-frame positions found by the last call to
      invalid reference
      #compute(double, float[], int, int, int)
      . Used when only the transforms have changed.
    • reset

      public void reset()
      Releases the state of this instance.