Package cz.fidentis.analyst.drawables
Class DrawableFeaturePoints
java.lang.Object
cz.fidentis.analyst.drawables.Drawable
cz.fidentis.analyst.drawables.DrawableFeaturePoints
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
DrawableFpWeights
Drawable feature points.
Points are rendered using smooth filled triangles (see
Drawable.initRendering(com.jogamp.opengl.GL2)
).- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class cz.fidentis.analyst.drawables.Drawable
Drawable.TransparencyComparator
-
Field Summary
FieldsFields inherited from class cz.fidentis.analyst.drawables.Drawable
GLU_CONTEXT
-
Constructor Summary
ConstructorsConstructorDescriptionDrawableFeaturePoints
(List<Landmark> featurePoints) Constructor.DrawableFeaturePoints
(List<Landmark> featurePoints, Color defaultColor, double defaultPerimeter) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a new feature pointgetAssignedColor
(int index) Gets the assigned color of a feature point based on its relation to meshgetColor
(int index) Returns color of the feature point.double
double
double
Gets the maximum distance of all feature points from the meshgetRenderMode
(int index) Returns render mode of the feature point.getSize
(int index) Returns size of the feature point.void
removeFeaturePoint
(int i) Removes a feature pointvoid
Removes a feature pointprotected void
renderObject
(com.jogamp.opengl.GL2 gl) void
Removes all individual colors of feature points.void
Removes all individual render modes of feature points.void
Removes all individual sizes of feature points.void
resetColorToDefault
(int index) Removes (possible) special color of the feature point.void
resetRenderModeToDefault
(int index) Removes (possible) special render mode of the feature point.void
resetSizeToDefault
(int index) Removes (possible) special size of the feature point.void
setCloseToMeshColor
(Color closeToMeshColor) void
Sets color of the feature point.void
setCustomFpColor
(Color customFpColor) void
setDistanceThreshold
(double distanceThreshold) void
setOffTheMeshColor
(Color offTheMeshColor) void
setOnTheMeshColor
(Color onTheMeshColor) void
setRenderMode
(int index, RenderingMode renderMode) Sets render mode of the feature point.void
setSize
(int index, double size) Sets size of the feature point.Methods inherited from class cz.fidentis.analyst.drawables.Drawable
finishRendering, getColor, getHighlights, getRenderMode, getTransparency, initRendering, isShown, render, setColor, setHighlights, setPolygonMode, setRenderMode, setTransparency, show
-
Field Details
-
FP_DEFAULT_COLOR
-
FP_DEFAULT_SIZE
public static final double FP_DEFAULT_SIZE- See Also:
-
-
Constructor Details
-
DrawableFeaturePoints
Constructor.- Parameters:
featurePoints
- Feature points
-
DrawableFeaturePoints
public DrawableFeaturePoints(List<Landmark> featurePoints, Color defaultColor, double defaultPerimeter) Constructor.- Parameters:
featurePoints
- Feature pointsdefaultColor
- Default colordefaultPerimeter
- Default perimeter
-
-
Method Details
-
addFeaturePoint
Adds a new feature point- Parameters:
fp
- featurePoint to be added
-
removeFeaturePoint
Removes a feature point- Parameters:
fp
- featurePoint to be removed
-
removeFeaturePoint
public void removeFeaturePoint(int i) Removes a feature point- Parameters:
i
- index
-
getColor
Returns color of the feature point.- Parameters:
index
- Index of the feature point- Returns:
- The color or
null
-
setColor
Sets color of the feature point.- Parameters:
index
- Index of the feature pointcolor
- New color of the feature point
-
getAssignedColor
Gets the assigned color of a feature point based on its relation to mesh- Parameters:
index
- index of a chosen feature point- Returns:
- Color
-
getMaxDistance
public double getMaxDistance()Gets the maximum distance of all feature points from the mesh- Returns:
- double
-
resetColorToDefault
public void resetColorToDefault(int index) Removes (possible) special color of the feature point.- Parameters:
index
- Index of the feature point
-
resetAllColorsToDefault
public void resetAllColorsToDefault()Removes all individual colors of feature points. -
getSize
Returns size of the feature point.- Parameters:
index
- Index of the feature point- Returns:
- The size or
null
-
setSize
public void setSize(int index, double size) Sets size of the feature point.- Parameters:
index
- Index of the feature pointsize
- New size of the feature point.
-
resetSizeToDefault
public void resetSizeToDefault(int index) Removes (possible) special size of the feature point.- Parameters:
index
- Index of the feature point
-
resetAllSizesToDefault
public void resetAllSizesToDefault()Removes all individual sizes of feature points. -
getRenderMode
Returns render mode of the feature point.- Parameters:
index
- Index of the feature point- Returns:
- The render mode or
null
-
setRenderMode
Sets render mode of the feature point.RenderingMode.NOTHING
hides the point.- Parameters:
index
- Index of the feature pointrenderMode
- New render mode of the feature point
-
resetRenderModeToDefault
public void resetRenderModeToDefault(int index) Removes (possible) special render mode of the feature point.- Parameters:
index
- Index of the feature point
-
resetAllRenderModesToDefault
public void resetAllRenderModesToDefault()Removes all individual render modes of feature points. -
renderObject
protected void renderObject(com.jogamp.opengl.GL2 gl) - Specified by:
renderObject
in classDrawable
-
getFeaturePoints
-
getDefaultPerimeter
public double getDefaultPerimeter() -
getDistanceThreshold
public double getDistanceThreshold() -
getOffTheMeshColor
-
getCloseToMeshColor
-
getOnTheMeshColor
-
getCustomFpColor
-
setDistanceThreshold
public void setDistanceThreshold(double distanceThreshold) -
setOffTheMeshColor
-
setCloseToMeshColor
-
setOnTheMeshColor
-
setCustomFpColor
-