Package gaiasky.data.octreegen
Class ParticleDataBinaryIO
java.lang.Object
gaiasky.data.octreegen.ParticleDataBinaryIO
Loads and writes particle data to/from our own binary format. The format is
defined as follows. The operations are based on abstract position entities, so
this is not suitable for loading star groups or particle groups.
- 32 bits (int) with the number of stars, starNum repeat the following starNum times (for each star)
- 32 bits (int) - The the length of the name, or nameLength
- 16 bits * nameLength (chars) - The name of the star
- 32 bits (float) - appmag
- 32 bits (float) - absmag
- 32 bits (float) - colorbv
- 32 bits (float) - r
- 32 bits (float) - g
- 32 bits (float) - b
- 32 bits (float) - a
- 32 bits (float) - ra [deg]
- 32 bits (float) - dec [deg]
- 32 bits (float) - distance [u]
- 64 bits (double) - x [u]
- 64 bits (double) - y [u]
- 64 bits (double) - z [u]
- 32 bits (float) - mualpha [mas/yr]
- 32 bits (float) - mudelta [mas/yr]
- 32 bits (float) - radvel [km/s]
- 32 bits (float) - pmx [u/yr]
- 32 bits (float) - pmy [u/yr]
- 32 bits (float) - pmz [u/yr]
- 64 bits (long) - id
- 32 bits (int) - HIP
- 32 bits (int) - TYClength
- 16 bits (char) * TYClength - TYC
- 8 bits (byte) - catalogSource
- 64 bits (long) - pageId
- 32 bits (int) - particleType
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.badlogic.gdx.utils.Array<SceneGraphNode>
readParticles(InputStream in)
void
writeParticles(com.badlogic.gdx.utils.Array<SceneGraphNode> particles, OutputStream out)
-
Constructor Details
-
ParticleDataBinaryIO
public ParticleDataBinaryIO()
-
-
Method Details
-
writeParticles
public void writeParticles(com.badlogic.gdx.utils.Array<SceneGraphNode> particles, OutputStream out) -
readParticles
public com.badlogic.gdx.utils.Array<SceneGraphNode> readParticles(InputStream in) throws FileNotFoundException- Throws:
FileNotFoundException
-