Package gov.nih.mipav.model.algorithms
Class ContourPlot.Points
- java.lang.Object
-
- gov.nih.mipav.model.algorithms.ContourPlot.Points
-
- All Implemented Interfaces:
ContourPlot.Renderable
- Enclosing class:
- ContourPlot
public class ContourPlot.Points extends java.lang.Object implements ContourPlot.Renderable
The Points class is a collection of 2D points that are to be represented using the sameContourPlot.Glyph
(the graphical representation of a point). A point instance in this collection has the following attributes.- position - the 2D location of the point
- scaling - the scaling of the glyph it is represented with
- rotation - the rotation of the glyph it is represented with
- color - the color with wich the glyph it is renered
- picking color - the picking color with which the glyph is rendered into the (invisible) picking color attachment
of an
FBO
. This color may serve as an identifier of the object that can be queried from a location of the rendering canvas. It may take on a value in range of 0xff000001 to 0xffffffff (16.777.214 possible values) or 0.
ContourPlot.Points
class features a global scaling parameter by which all point instances of this collection will be scaled at rendering (#setGlobalScaling(double)
). Also a global alpha multiplier which scales every points color alpha value, which can be used to introduce transparency for all points of this collection, which may come in handy to visualize density when plotting a huge amount of points.- Author:
- hageldave
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.function.DoubleSupplier
globalAlphaMultiplier
protected java.util.function.DoubleSupplier
globalSaturationMultiplier
protected java.util.function.DoubleSupplier
globalScaling
ContourPlot.Glyph
glyph
protected boolean
hidden
protected boolean
isDirty
protected boolean
isGLDoublePrecision
protected java.util.ArrayList<ContourPlot.PointDetails>
points
protected boolean
useVertexRounding
-
Constructor Summary
Constructors Constructor Description Points()
Creates a newContourPlot.Points
object which usesDefaultGlyph#CIRCLE_F
for displaying its points.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.ArrayList<ContourPlot.PointDetails>
getPointDetails()
boolean
intersects(java.awt.geom.Rectangle2D rect)
tests if thisContourPlot.Renderable
intersects or contains the specified rectangle.boolean
isDirty()
if true, indicates that a call to#updateGL(boolean)
is necessary to sync this objects GL resources to its current state.int
numPoints()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface gov.nih.mipav.model.algorithms.ContourPlot.Renderable
isHidden
-
-
-
-
Field Detail
-
glyph
public ContourPlot.Glyph glyph
-
isDirty
protected boolean isDirty
-
globalScaling
protected java.util.function.DoubleSupplier globalScaling
-
globalAlphaMultiplier
protected java.util.function.DoubleSupplier globalAlphaMultiplier
-
globalSaturationMultiplier
protected java.util.function.DoubleSupplier globalSaturationMultiplier
-
points
protected java.util.ArrayList<ContourPlot.PointDetails> points
-
hidden
protected boolean hidden
-
useVertexRounding
protected boolean useVertexRounding
-
isGLDoublePrecision
protected boolean isGLDoublePrecision
-
-
Constructor Detail
-
Points
public Points()
Creates a newContourPlot.Points
object which usesDefaultGlyph#CIRCLE_F
for displaying its points.
-
-
Method Detail
-
numPoints
public int numPoints()
- Returns:
- the number of points in this in this
ContourPlot.Points
object.
-
isDirty
public boolean isDirty()
Description copied from interface:ContourPlot.Renderable
if true, indicates that a call to#updateGL(boolean)
is necessary to sync this objects GL resources to its current state.- Specified by:
isDirty
in interfaceContourPlot.Renderable
- Returns:
- true if dirty
-
intersects
public boolean intersects(java.awt.geom.Rectangle2D rect)
Description copied from interface:ContourPlot.Renderable
tests if thisContourPlot.Renderable
intersects or contains the specified rectangle.- Specified by:
intersects
in interfaceContourPlot.Renderable
- Parameters:
rect
- rectangle to test- Returns:
- true when intersecting
-
getPointDetails
public java.util.ArrayList<ContourPlot.PointDetails> getPointDetails()
- Returns:
- the list of point details.
Make sure to call#setDirty()
when manipulating.
-
-