Class StarsConvertor


  • public class StarsConvertor
    extends java.lang.Object
    Converts a star background based on a subset of ESA Hipparcos catalog to ByteBuffer.
    • Constructor Summary

      Constructors 
      Constructor Description
      StarsConvertor()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.nio.ByteBuffer convertTsvToByteBuffer​(java.lang.String starsFileName)
      Converts a Stars tsv file to a ByteBuffer with radius DEFAULT_RADIUS
      static java.nio.ByteBuffer convertTsvToByteBuffer​(java.lang.String starsFileName, float radius)
      Converts a Stars tsv file to a ByteBuffer
      static void convertTsvToDat​(java.lang.String tsvFileName)
      Convert star tsv text file to binary dat file
      static void convertTsvToDat​(java.lang.String tsvFileName, float radius)
      Convert star tsv text file to binary dat file
      static void convertTsvToDat​(java.lang.String tsvFileName, java.lang.String datFileName)
      Convert star tsv text file to binary dat file
      static void convertTsvToDat​(java.lang.String tsvFileName, java.lang.String datFileName, float radius)
      Convert star tsv text file to binary dat file
      static void main​(java.lang.String[] args)  
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StarsConvertor

        public StarsConvertor()
    • Method Detail

      • convertTsvToDat

        public static void convertTsvToDat​(java.lang.String tsvFileName)
        Convert star tsv text file to binary dat file
        Parameters:
        tsvFileName - name of tsv text star file
      • convertTsvToDat

        public static void convertTsvToDat​(java.lang.String tsvFileName,
                                           float radius)
        Convert star tsv text file to binary dat file
        Parameters:
        tsvFileName - name of tsv text star file
        radius - radius of star sphere
      • convertTsvToDat

        public static void convertTsvToDat​(java.lang.String tsvFileName,
                                           java.lang.String datFileName)
        Convert star tsv text file to binary dat file
        Parameters:
        tsvFileName - name of tsv text star file
        datFileName - name of dat binary star file
      • convertTsvToDat

        public static void convertTsvToDat​(java.lang.String tsvFileName,
                                           java.lang.String datFileName,
                                           float radius)
        Convert star tsv text file to binary dat file
        Parameters:
        tsvFileName - name of tsv text star file
        datFileName - name of dat binary star file
        radius - radius of star sphere
      • convertTsvToByteBuffer

        public static java.nio.ByteBuffer convertTsvToByteBuffer​(java.lang.String starsFileName)
        Converts a Stars tsv file to a ByteBuffer with radius DEFAULT_RADIUS
        Parameters:
        starsFileName - filename of tsv file
        Returns:
        ByteBuffer with interleaved color and vertex positions as floats in little-endian order
      • convertTsvToByteBuffer

        public static java.nio.ByteBuffer convertTsvToByteBuffer​(java.lang.String starsFileName,
                                                                 float radius)
        Converts a Stars tsv file to a ByteBuffer
        Parameters:
        starsFileName - filename of tsv file
        radius - radius of the sphere on which to paint stars
        Returns:
        ByteBuffer with interleaved color and vertex positions as floats in little-endian order
      • main

        public static void main​(java.lang.String[] args)