Record Class Particle
java.lang.Object
java.lang.Record
gaiasky.scene.record.Particle
- Record Components:
id- The particle identifier.names- The name array.x- X component of position vector at epoch.y- Y component of position vector at epoch.z- Z component of position vector at epoch.extra- Map with extra attributes.
- All Implemented Interfaces:
IParticleRecord
public record Particle(long id, String[] names, double x, double y, double z, com.badlogic.gdx.utils.ObjectMap<UCD,Object> extra)
extends Record
implements IParticleRecord
Record class to store particles of all kinds.
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloatabsMag()floatappMag()floatcolor()final booleanIndicates whether some other object is "equal to" this one.extra()Returns the value of theextrarecord component.com.badlogic.gdx.utils.ObjectMap.Keys<UCD> getExtra()Gets the extra attributes map.Gets the extra data filed with the given UCD.Gets the extra data filed with the given name.doublegetExtraNumber(UCD ucd) Gets the extra data filed with the given UCD, as a double number.doublegetExtraNumber(String name) Gets the extra data filed with the given name, as a double number.getType()Returns the particle record type.booleanhasColor()booleanhasExtra()booleanbooleanfinal inthashCode()Returns a hash code value for this object.booleanbooleanbooleanbooleanhasSize()longid()Returns the value of theidrecord component.String[]names()Returns the value of thenamesrecord component.doubleradius()double[]rgb()voidsetExtraAttributes(com.badlogic.gdx.utils.ObjectMap<UCD, Object> e) floatsize()final StringtoString()Returns a string representation of this record class.floatvx()floatvy()floatvz()doublex()Returns the value of thexrecord component.doubley()Returns the value of theyrecord component.doublez()Returns the value of thezrecord component.Methods inherited from interface IParticleRecord
argOfPericenter, ascendingNode, b, beta, dec, distance, eccentricity, epoch, hip, inclination, isVariable, l, lambda, meanAnomaly, muAlpha, muDelta, nVari, parallax, period, pos, ra, radVel, semiMajorAxis, tEff, variMags, variTimesModifier and TypeMethodDescriptiondefault doubledefault doubledefault doubleb()default doublebeta()default doubledec()default doubledistance()default doubledefault doubleepoch()default inthip()default doubledefault booleanReturns whether this particle record has aVariableattached, making it a variable star.default doublel()default doublelambda()default doubledefault floatmuAlpha()default floatmuDelta()default intnVari()default doubleparallax()default doubleperiod()default Vector3Ddefault doublera()default floatradVel()default doubledefault floattEff()default float[]variMags()default double[]
-
Constructor Details
-
Particle
Constructor for particles or stars. Pass in the lists directly. -
Particle
-
-
Method Details
-
getType
Description copied from interface:IParticleRecordReturns the particle record type.- Specified by:
getTypein interfaceIParticleRecord- Returns:
- The type.
-
hasProperMotion
public boolean hasProperMotion()- Specified by:
hasProperMotionin interfaceIParticleRecord
-
vx
public float vx()- Specified by:
vxin interfaceIParticleRecord
-
vy
public float vy()- Specified by:
vyin interfaceIParticleRecord
-
vz
public float vz()- Specified by:
vzin interfaceIParticleRecord
-
names
Returns the value of thenamesrecord component.- Specified by:
namesin interfaceIParticleRecord- Returns:
- the value of the
namesrecord component
-
namesConcat
- Specified by:
namesConcatin interfaceIParticleRecord
-
hasName
- Specified by:
hasNamein interfaceIParticleRecord
-
hasName
- Specified by:
hasNamein interfaceIParticleRecord
-
setExtraAttributes
- Specified by:
setExtraAttributesin interfaceIParticleRecord
-
hasExtra
public boolean hasExtra()- Specified by:
hasExtrain interfaceIParticleRecord
-
hasExtra
- Specified by:
hasExtrain interfaceIParticleRecord
-
hasExtra
- Specified by:
hasExtrain interfaceIParticleRecord
-
getExtra
Description copied from interface:IParticleRecordGets the extra attributes map.- Specified by:
getExtrain interfaceIParticleRecord- Returns:
- The map.
-
getExtra
Description copied from interface:IParticleRecordGets the extra data filed with the given name.- Specified by:
getExtrain interfaceIParticleRecord- Parameters:
name- The name of the data filed to get.- Returns:
- The data field, or null if it does not exist.
-
getExtra
Description copied from interface:IParticleRecordGets the extra data filed with the given UCD.- Specified by:
getExtrain interfaceIParticleRecord- Parameters:
ucd- The UCD of the data filed to get.- Returns:
- The data field, or null if it does not exist.
-
getExtraNumber
Description copied from interface:IParticleRecordGets the extra data filed with the given name, as a double number.- Specified by:
getExtraNumberin interfaceIParticleRecord- 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
Description copied from interface:IParticleRecordGets the extra data filed with the given UCD, as a double number.- Specified by:
getExtraNumberin interfaceIParticleRecord- 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.
-
extraKeys
- Specified by:
extraKeysin interfaceIParticleRecord
-
appMag
public float appMag()- Specified by:
appMagin interfaceIParticleRecord
-
absMag
public float absMag()- Specified by:
absMagin interfaceIParticleRecord
-
hasColor
public boolean hasColor()- Specified by:
hasColorin interfaceIParticleRecord
-
color
public float color()- Specified by:
colorin interfaceIParticleRecord
-
rgb
public double[] rgb()- Specified by:
rgbin interfaceIParticleRecord
-
hasSize
public boolean hasSize()- Specified by:
hasSizein interfaceIParticleRecord
-
size
public float size()- Specified by:
sizein interfaceIParticleRecord
-
radius
public double radius()- Specified by:
radiusin interfaceIParticleRecord
-
id
public long id()Returns the value of theidrecord component.- Specified by:
idin interfaceIParticleRecord- Returns:
- the value of the
idrecord component
-
toString
-
hashCode
-
equals
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
x
public double x()Returns the value of thexrecord component.- Specified by:
xin interfaceIParticleRecord- Returns:
- the value of the
xrecord component
-
y
public double y()Returns the value of theyrecord component.- Specified by:
yin interfaceIParticleRecord- Returns:
- the value of the
yrecord component
-
z
public double z()Returns the value of thezrecord component.- Specified by:
zin interfaceIParticleRecord- Returns:
- the value of the
zrecord component
-
extra
-