Record Class ParticleVector

java.lang.Object
java.lang.Record
gaiasky.scene.record.ParticleVector
Record Components:
data - The data array containing the position.
All Implemented Interfaces:
IParticleRecord

public record ParticleVector(double[] data) extends Record implements IParticleRecord
A particle record that only contains positions, stored in a double array.
  • Constructor Details

    • ParticleVector

      public ParticleVector(double[] data)
      Creates an instance of a ParticleVector record class.
      Parameters:
      data - the value for the data record component
  • Method Details

    • setPos

      public void setPos(double x, double y, double z)
    • x

      public double x()
      Specified by:
      x in interface IParticleRecord
    • setX

      public void setX(double x)
    • y

      public double y()
      Specified by:
      y in interface IParticleRecord
    • setY

      public void setY(double y)
    • z

      public double z()
      Specified by:
      z in interface IParticleRecord
    • setZ

      public void setZ(double z)
    • names

      public String[] names()
      Specified by:
      names in interface IParticleRecord
    • namesConcat

      public String namesConcat()
      Specified by:
      namesConcat in interface IParticleRecord
    • hasName

      public boolean hasName(String candidate)
      Specified by:
      hasName in interface IParticleRecord
    • hasName

      public boolean hasName(String candidate, boolean matchCase)
      Specified by:
      hasName in interface IParticleRecord
    • vx

      public float vx()
      Specified by:
      vx in interface IParticleRecord
    • vy

      public float vy()
      Specified by:
      vy in interface IParticleRecord
    • vz

      public float vz()
      Specified by:
      vz in interface IParticleRecord
    • appMag

      public float appMag()
      Specified by:
      appMag in interface IParticleRecord
    • absMag

      public float absMag()
      Specified by:
      absMag in interface IParticleRecord
    • hasColor

      public boolean hasColor()
      Specified by:
      hasColor in interface IParticleRecord
    • color

      public float color()
      Specified by:
      color in interface IParticleRecord
    • size

      public float size()
      Specified by:
      size in interface IParticleRecord
    • setSize

      public void setSize(double size)
    • radius

      public double radius()
      Specified by:
      radius in interface IParticleRecord
    • id

      public long id()
      Specified by:
      id in interface IParticleRecord
    • hip

      public int hip()
      Specified by:
      hip in interface IParticleRecord
    • rgb

      public double[] rgb()
      Specified by:
      rgb in interface IParticleRecord
    • setRGB

      public void setRGB(double r, double g, double b)
    • hasSize

      public boolean hasSize()
      Specified by:
      hasSize in interface IParticleRecord
    • pos

      public Vector3D pos(Vector3D aux)
      Specified by:
      pos in interface IParticleRecord
    • hasProperMotion

      public boolean hasProperMotion()
      Specified by:
      hasProperMotion in interface IParticleRecord
    • tEff

      public float tEff()
      Specified by:
      tEff in interface IParticleRecord
      Returns:
      The effective temperature in K.
    • setExtraAttributes

      public void setExtraAttributes(com.badlogic.gdx.utils.ObjectMap<UCD,Object> extra)
      Specified by:
      setExtraAttributes in interface IParticleRecord
    • hasExtra

      public boolean hasExtra()
      Specified by:
      hasExtra in interface IParticleRecord
    • extraKeys

      public com.badlogic.gdx.utils.ObjectMap.Keys<UCD> extraKeys()
      Specified by:
      extraKeys in interface IParticleRecord
    • getType

      public ParticleType getType()
      Description copied from interface: IParticleRecord
      Returns the particle record type.
      Specified by:
      getType in interface IParticleRecord
      Returns:
      The type.
    • hasExtra

      public boolean hasExtra(String name)
      Specified by:
      hasExtra in interface IParticleRecord
    • hasExtra

      public boolean hasExtra(UCD ucd)
      Specified by:
      hasExtra in interface IParticleRecord
    • getExtra

      public com.badlogic.gdx.utils.ObjectMap<UCD,Object> getExtra()
      Description copied from interface: IParticleRecord
      Gets the extra attributes map.
      Specified by:
      getExtra in interface IParticleRecord
      Returns:
      The map.
    • getExtra

      public Object getExtra(String name)
      Description copied from interface: IParticleRecord
      Gets the extra data filed with the given name.
      Specified by:
      getExtra in interface IParticleRecord
      Parameters:
      name - The name of the data filed to get.
      Returns:
      The data field, or null if it does not exist.
    • getExtra

      public Object getExtra(UCD ucd)
      Description copied from interface: IParticleRecord
      Gets the extra data filed with the given UCD.
      Specified by:
      getExtra in interface IParticleRecord
      Parameters:
      ucd - The UCD of the data filed to get.
      Returns:
      The data field, or null if it does not exist.
    • getExtraNumber

      public double getExtraNumber(String name)
      Description copied from interface: IParticleRecord
      Gets the extra data filed with the given name, as a double number.
      Specified by:
      getExtraNumber in interface IParticleRecord
      Parameters:
      name - The name of the data filed to get.
      Returns:
      The data field as a double, or NaN if it does not exist or is not a number.
    • getExtraNumber

      public double getExtraNumber(UCD ucd)
      Description copied from interface: IParticleRecord
      Gets the extra data filed with the given UCD, as a double number.
      Specified by:
      getExtraNumber in interface IParticleRecord
      Parameters:
      ucd - The UCD of the data filed to get.
      Returns:
      The data field as a double, or NaN if it does not exist or is not a number.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • data

      public double[] data()
      Returns the value of the data record component.
      Returns:
      the value of the data record component