Class PointCloudData


  • public class PointCloudData
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      double period  
      java.util.List<java.time.Instant> time  
      java.util.List<java.lang.Double> x  
      java.util.List<java.lang.Double> y  
      java.util.List<java.lang.Double> z  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addPoint​(double x, double y, double z)
      Adds a single point to the cloud
      void addPoint​(Vector3d point)
      Adds a single point o this point cloud
      void addPoints​(double[] points)
      Adds the given vector to the current points.
      void addPoints​(java.util.ArrayList points)
      Same as addPoints(double[]) but with an array list
      void clear()
      Clears all data
      java.time.Instant getDate​(int index)  
      java.time.Instant getEnd()  
      long getEndMs()  
      int getIndex​(long wrappedTimeMs)  
      int getIndex​(java.time.Instant instant)
      Gets the bounding indices for the given date.
      int getNumPoints()  
      java.time.Instant getStart()  
      long getStartMs()  
      java.time.Instant getWrapTime​(java.time.Instant instant)  
      long getWrapTimeMs​(java.time.Instant instant)  
      double getX​(int index)  
      double getY​(int index)  
      double getZ​(int index)  
      boolean isEmpty()  
      void loadPoint​(Vector3d v, int index)
      Loads the data point at the index in the vector in the Orbit reference system
      boolean loadPoint​(Vector3d v, long timeMs)
      Returns a vector with the data point at the given time.
      boolean loadPoint​(Vector3d v, java.time.Instant instant)
      Returns a vector with the data point at the given time.
      void loadPointF​(com.badlogic.gdx.math.Vector3 v, int index)
      Loads the data point at the index in the vector in the world reference system
      java.time.Instant loadTime​(int index)  
      void setX​(int index, double value)  
      void setY​(int index, double value)  
      void setZ​(int index, double value)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • x

        public java.util.List<java.lang.Double> x
      • y

        public java.util.List<java.lang.Double> y
      • z

        public java.util.List<java.lang.Double> z
      • time

        public java.util.List<java.time.Instant> time
      • period

        public double period
    • Constructor Detail

      • PointCloudData

        public PointCloudData()
      • PointCloudData

        public PointCloudData​(int capacity)
    • Method Detail

      • clear

        public void clear()
        Clears all data
      • isEmpty

        public boolean isEmpty()
      • addPoints

        public void addPoints​(double[] points)
        Adds the given vector to the current points. The vector is of the form [x0, y0, z0, x1, y1, z1, ..., xn, yn, zn]. If the size of the vector is not a multiple of 3, no points are added
        Parameters:
        points - The points to add to this point cloud
      • addPoints

        public void addPoints​(java.util.ArrayList points)
        Same as addPoints(double[]) but with an array list
        Parameters:
        points - The points to add to this point cloud
      • addPoint

        public void addPoint​(Vector3d point)
        Adds a single point o this point cloud
        Parameters:
        point - The point
      • addPoint

        public void addPoint​(double x,
                             double y,
                             double z)
        Adds a single point to the cloud
        Parameters:
        x - The x component
        y - The y component
        z - The z component
      • loadPoint

        public void loadPoint​(Vector3d v,
                              int index)
        Loads the data point at the index in the vector in the Orbit reference system
        Parameters:
        v -
        index -
      • loadTime

        public java.time.Instant loadTime​(int index)
      • getNumPoints

        public int getNumPoints()
      • getX

        public double getX​(int index)
      • setX

        public void setX​(int index,
                         double value)
      • getY

        public double getY​(int index)
      • setY

        public void setY​(int index,
                         double value)
      • getZ

        public double getZ​(int index)
      • setZ

        public void setZ​(int index,
                         double value)
      • getDate

        public java.time.Instant getDate​(int index)
      • getStart

        public java.time.Instant getStart()
      • getStartMs

        public long getStartMs()
      • getEnd

        public java.time.Instant getEnd()
      • getEndMs

        public long getEndMs()
      • loadPointF

        public void loadPointF​(com.badlogic.gdx.math.Vector3 v,
                               int index)
        Loads the data point at the index in the vector in the world reference system
        Parameters:
        v -
        index -
      • loadPoint

        public boolean loadPoint​(Vector3d v,
                                 java.time.Instant instant)
        Returns a vector with the data point at the given time. It uses linear interpolation. The time instant must be within the bounds of this point cloud's times
        Parameters:
        v - The vector
        instant - The time as an instant
        Returns:
        Whether the operation completes successfully
      • loadPoint

        public boolean loadPoint​(Vector3d v,
                                 long timeMs)
        Returns a vector with the data point at the given time. It uses linear interpolation. The time instant must be within the bounds of this point cloud's times
        Parameters:
        v - The vector
        timeMs - The time in milliseconds
        Returns:
        Whether the operation completes successfully
      • getWrapTime

        public java.time.Instant getWrapTime​(java.time.Instant instant)
      • getWrapTimeMs

        public long getWrapTimeMs​(java.time.Instant instant)
      • getIndex

        public int getIndex​(java.time.Instant instant)
        Gets the bounding indices for the given date. If the date is out of range, it wraps.
        Parameters:
        instant - The date
        Returns:
        The two indices
      • getIndex

        public int getIndex​(long wrappedTimeMs)