Class LinePath


  • public class LinePath
    extends Object
    • Constructor Detail

      • LinePath

        public LinePath()
      • LinePath

        public LinePath​(int initialNumVertices,
                        int vboBlockSizeFactor)
    • Method Detail

      • moveTo

        public void moveTo​(float x,
                           float y)
      • moveTo

        public void moveTo​(float x,
                           float y,
                           float mileage)
      • lineTo

        public void lineTo​(float x,
                           float y)
      • clear

        public void clear()
      • addRectangle

        public void addRectangle​(float x1,
                                 float y1,
                                 float x2,
                                 float y2)
        Convenience method for adding an axis-aligned rectangle.
      • addPolygon

        public void addPolygon​(float... xys)
        Convenience method for adding a polygon.

        Use of varargs makes this method convenient, but may also make it inefficient in some cases, since the args must be passed in a float[] array.

      • dispose

        public void dispose​(com.jogamp.opengl.GL gl)
        Disposes buffers on host and device.

        This object must not be used again after this method has been called.

      • numVertices

        public int numVertices()
      • mileageVbo

        public GLStreamingBuffer mileageVbo​(com.jogamp.opengl.GL gl,
                                            double ppvAspectRatio,
                                            double ppvAspectRatioChangeThreshold)
        Recomputes mileages as necessary (based on the given threshold, and on the change in ppv-aspect-ratio), then returns the mileage VBO.
      • rawMileageVbo

        public GLStreamingBuffer rawMileageVbo​(com.jogamp.opengl.GL gl)
        Returns the mileage VBO without recomputing the mileage values. This is useful when meaningful values are not required, such as when rendering with stippling disabled.