Class DrawableCuttingPlane


public class DrawableCuttingPlane extends DrawablePlane
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).
  • Constructor Details

    • DrawableCuttingPlane

      public DrawableCuttingPlane(Plane plane, Box bbox, boolean showBBox)
      Constructor.
      Parameters:
      plane - plane
      bbox - bounding box used to estimate cutting pale shape (rectangle)
      showBBox - whether to render bounding box
    • DrawableCuttingPlane

      public DrawableCuttingPlane(DrawableCuttingPlane drPlane)
      Copy constructor.
      Parameters:
      drPlane - Original plane
      Throws:
      NullPointerException - if the input argument is null
  • 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

      public Plane getPlane()
      Overrides:
      getPlane in class DrawablePlane
    • getNonShiftedPlane

      public Plane getNonShiftedPlane()
      Returns original non-shifted plane
      Returns:
      original non-shifted plane
    • getMirrorPlane

      public 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 if true, hides otherwise
    • isMirrorPlaneShown

      public boolean isMirrorPlaneShown()
      Returns true 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 class DrawablePlane