Class LinePath
- java.lang.Object
-
- com.metsci.glimpse.core.support.shader.line.LinePath
-
public class LinePath extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPolygon(float... xys)Convenience method for adding a polygon.voidaddRectangle(float x1, float y1, float x2, float y2)Convenience method for adding an axis-aligned rectangle.voidclear()voidcloseLoop()After calling this method, client code must next callmoveTo(float, float, float), before calling eitherlineTo(float, float)orcloseLoop()again.voiddispose(com.jogamp.opengl.GL gl)Disposes buffers on host and device.GLStreamingBufferflagsVbo(com.jogamp.opengl.GL gl)voidlineTo(float x, float y)GLStreamingBuffermileageVbo(com.jogamp.opengl.GL gl, double ppvAspectRatio)CallsmileageVbo(GL, double, double)with a threshold of 1+epsilon.GLStreamingBuffermileageVbo(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.voidmoveTo(float x, float y)voidmoveTo(float x, float y, float mileage)intnumVertices()GLStreamingBufferrawMileageVbo(com.jogamp.opengl.GL gl)Returns the mileage VBO without recomputing the mileage values.GLStreamingBufferxyVbo(com.jogamp.opengl.GL gl)
-
-
-
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)
-
closeLoop
public void closeLoop()
After calling this method, client code must next callmoveTo(float, float, float), before calling eitherlineTo(float, float)orcloseLoop()again.
-
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()
-
xyVbo
public GLStreamingBuffer xyVbo(com.jogamp.opengl.GL gl)
-
flagsVbo
public GLStreamingBuffer flagsVbo(com.jogamp.opengl.GL gl)
-
mileageVbo
public GLStreamingBuffer mileageVbo(com.jogamp.opengl.GL gl, double ppvAspectRatio)
CallsmileageVbo(GL, double, double)with a threshold of 1+epsilon.
-
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.
-
-