Class LengthItem


  • class LengthItem
    extends java.lang.Object
    Struct used to store information about length values. Specifically, each item stores the "length" (which can be thought of as the time elapsed along the spline path), the "t" value at this length (used to calculate the (x,y) point along the spline), and the "fraction" which is equal to the length divided by the total absolute length of the spline. After we calculate all LengthItems for a give spline, we have a list of entries which can return the t values for fractional lengths from 0 to 1.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) float fraction  
      (package private) float length  
      (package private) float t  
    • Constructor Summary

      Constructors 
      Constructor Description
      LengthItem​(float length, float t)  
      LengthItem​(float length, float t, float fraction)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      float getFraction()  
      float getLength()  
      float getT()  
      (package private) void setFraction​(float totalLength)  
      • Methods inherited from class java.lang.Object

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

      • length

        float length
      • t

        float t
      • fraction

        float fraction
    • Constructor Detail

      • LengthItem

        LengthItem​(float length,
                   float t,
                   float fraction)
      • LengthItem

        LengthItem​(float length,
                   float t)
    • Method Detail

      • getLength

        public float getLength()
      • getT

        public float getT()
      • getFraction

        public float getFraction()
      • setFraction

        void setFraction​(float totalLength)