Package cz.fidentis.analyst.drawables
Class Drawable
java.lang.Object
cz.fidentis.analyst.drawables.Drawable
- Direct Known Subclasses:
DrawableFeaturePoints
,DrawableFpSkeleton
,DrawableInteractiveMask
,DrawableLine
,DrawableMesh
,DrawablePlane
,DrawablePointCloud
A drawable object, i.e., an object with drawing state and capable to
render itself into an OpenGL context.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Comparator for Drawable objects based on transparency. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
finishRendering
(com.jogamp.opengl.GL2 gl) getColor()
float
protected void
initRendering
(com.jogamp.opengl.GL2 gl) boolean
isShown()
void
render
(com.jogamp.opengl.GL2 gl) Renders the scene.protected abstract void
renderObject
(com.jogamp.opengl.GL2 gl) void
Sets colorvoid
setHighlights
(Color highlights) SetsColor
of highlightsprotected void
setPolygonMode
(com.jogamp.opengl.GL2 gl) void
setRenderMode
(RenderingMode renderMode) Sets rendering modevoid
setTransparency
(float transparency) Sets transparencyvoid
show
(boolean show) Shows or hides the drawable.
-
Field Details
-
GLU_CONTEXT
protected static final com.jogamp.opengl.glu.GLU GLU_CONTEXT
-
-
Constructor Details
-
Drawable
public Drawable()Default constructor. -
Drawable
Copy constructor.- Parameters:
drawable
- Original drawable object- Throws:
NullPointerException
- if the input argument isnull
-
-
Method Details
-
render
public void render(com.jogamp.opengl.GL2 gl) Renders the scene.- Parameters:
gl
- OpenGL context
-
initRendering
protected void initRendering(com.jogamp.opengl.GL2 gl) -
renderObject
protected abstract void renderObject(com.jogamp.opengl.GL2 gl) -
finishRendering
protected void finishRendering(com.jogamp.opengl.GL2 gl) -
show
public void show(boolean show) Shows or hides the drawable.- Parameters:
show
- Iftrue
, then the drawable is shown.
-
isShown
public boolean isShown()- Returns:
true
if the object is included (rendered) in the scene.
-
setColor
Sets color- Parameters:
color
- Color
-
getColor
- Returns:
Color
-
getTransparency
public float getTransparency()- Returns:
- Current value of transparency
-
setTransparency
public void setTransparency(float transparency) Sets transparency- Parameters:
transparency
- Transparency
-
getHighlights
- Returns:
Color
of highlights
-
setHighlights
SetsColor
of highlights- Parameters:
highlights
-
-
getRenderMode
- Returns:
- Value of
renderMode
-
setRenderMode
Sets rendering mode- Parameters:
renderMode
- Rendering mode
-
setPolygonMode
protected void setPolygonMode(com.jogamp.opengl.GL2 gl)
-