Package cz.fidentis.analyst.drawables
Class DrawableCuttingPlane
java.lang.Object
cz.fidentis.analyst.drawables.Drawable
cz.fidentis.analyst.drawables.DrawablePlane
cz.fidentis.analyst.drawables.DrawableCuttingPlane
Drawable plane with the possibility to shift it along the normal and,
moreover, to show a "mirror" plane (a plane shifted in the opposite direction).
-
Nested Class Summary
Nested classes/interfaces inherited from class cz.fidentis.analyst.drawables.Drawable
Drawable.TransparencyComparator
-
Field Summary
Fields inherited from class cz.fidentis.analyst.drawables.Drawable
GLU_CONTEXT
-
Constructor Summary
ConstructorsConstructorDescriptionDrawableCuttingPlane
(Plane plane, Box bbox, boolean showBBox) Constructor.DrawableCuttingPlane
(DrawableCuttingPlane drPlane) Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturns the cutting plane shifted to opposite direction.Returns original non-shifted planegetPlane()
double
getShift()
Returns current shift value of planeboolean
Returnstrue
if the mirror planes are set to be shown.protected void
renderObject
(com.jogamp.opengl.GL2 gl) void
shift
(double dist) Moves the plane in the plane's normal direction relatively to the original position.void
showMirrorPlane
(boolean show) Shows/hides the mirror plane (i.e., the cutting plane shifted in the opposite directionMethods inherited from class cz.fidentis.analyst.drawables.DrawablePlane
getBBox, isShownBBobx, renderObject, setPlane, setShowBBox
Methods inherited from class cz.fidentis.analyst.drawables.Drawable
finishRendering, getColor, getHighlights, getRenderMode, getTransparency, initRendering, isShown, render, setColor, setHighlights, setPolygonMode, setRenderMode, setTransparency, show
-
Constructor Details
-
DrawableCuttingPlane
Constructor.- Parameters:
plane
- planebbox
- bounding box used to estimate cutting pale shape (rectangle)showBBox
- whether to render bounding box
-
DrawableCuttingPlane
Copy constructor.- Parameters:
drPlane
- Original plane- Throws:
NullPointerException
- if the input argument isnull
-
-
Method Details
-
shift
public void shift(double dist) Moves the plane in the plane's normal direction relatively to the original position.- Parameters:
dist
- Distance. If positive, then the movements is in the direction of the normal vector. Otherwise, the movement is against the normal direction.
-
getShift
public double getShift()Returns current shift value of plane- Returns:
- current shift value of plane
-
getPlane
- Overrides:
getPlane
in classDrawablePlane
-
getNonShiftedPlane
Returns original non-shifted plane- Returns:
- original non-shifted plane
-
getMirrorPlane
Returns the cutting plane shifted to opposite direction.- Returns:
- the cutting plane shifted to opposite direction
-
showMirrorPlane
public void showMirrorPlane(boolean show) Shows/hides the mirror plane (i.e., the cutting plane shifted in the opposite direction- Parameters:
show
- Shows iftrue
, hides otherwise
-
isMirrorPlaneShown
public boolean isMirrorPlaneShown()Returnstrue
if the mirror planes are set to be shown.- Returns:
true
if the mirror planes are set to be shown.
-
renderObject
protected void renderObject(com.jogamp.opengl.GL2 gl) - Overrides:
renderObject
in classDrawablePlane
-