Class Proximity

java.lang.Object
gaiasky.util.camera.Proximity

public class Proximity extends Object
Holds information on the order and properties of nearby particles to the camera.
  • Field Details

  • Constructor Details

    • Proximity

      public Proximity()
    • Proximity

      public Proximity(int size)
  • Method Details

    • set

      public void set(int index, int originalIndex, IParticleRecord pr, ICamera camera)
    • set

      public void set(int index, int originalIndex, IParticleRecord pr, ICamera camera, double deltaYears)
    • set

      public void set(int index, int originalIndex, IFocus focus, ICamera camera)
    • set

      public void set(int index, Proximity.NearbyRecord record)
      Sets the given record at the given index, overwriting the current value
      Parameters:
      index - The index
      record - The nearby record
    • insert

      public void insert(int index, Proximity.NearbyRecord record)
      Inserts the given record at the given index, moving the rest of the values to the right
      Parameters:
      index - The index
      record - The nearby record
    • insert

      public void insert(int index, IFocus object, ICamera camera)
      Inserts the given object at the given index, moving the rest of the values to the right
      Parameters:
      index - The index
      object - The nearby record
    • update

      public boolean update(Proximity.NearbyRecord object)
      Updates the list of proximal objects with the given Proximity.NearbyRecord
      Parameters:
      object - The record to use for updating
      Returns:
      Whether this proximity array was modified
    • update

      public boolean update(IFocus object, ICamera camera)
      Updates the list of proximal objects with the given IFocus
      Parameters:
      object - The record to use for updating
      camera - The camera
      Returns:
      Whether this proximity array was modified
    • swapBuffers

      public void swapBuffers()
      Swaps the arrays in this double-buffer implementation
    • convert

      public Proximity.NearbyRecord convert(IParticleRecord pr, Proximity.NearbyRecord c, ICamera camera, double deltaYears)
    • convert

      public Proximity.NearbyRecord convert(IFocus focus, Proximity.NearbyRecord c, ICamera camera)