Class SoClipPlaneManip

All Implemented Interfaces:
SafeDisposable

public class SoClipPlaneManip extends SoClipPlane
Manipulator to transform a clipping plane. This class defines a manipulator to transform a clipping plane. An SoJackDragger allows the user to rotate and translate the clipping plane.

This node clips all subsequent shapes in the scene graph to the half-space defined by the plane field. The half-space that is rendered is on the side of the plane in the direction of the plane normal. The half-space that is clipped away is on the side of the plane opposite the direction of the plane normal. For example, if the plane normal is 0,0,1 (pointing in the positive Z direction), then everything in the negative Z direction will be clipped away.

File format/default:

ClipPlaneManip {

    plane 1 0 0 0
    on true
    draggerPosition 0 0 0
}

See Also:
  • Field Details

    • draggerPosition

      public final SoSFVec3f draggerPosition
      Dragger position.
  • Constructor Details

    • SoClipPlaneManip

      public SoClipPlaneManip()
      Constructor.
  • Method Details

    • replaceManip

      public boolean replaceManip(SoPath p, SoClipPlane newOne)
      Replaces this manipulator with a regular SoClipPlane node.
    • setValue

      public void setValue(SbBox3f box, SbVec3f planeNormal, float draggerScaleFactor)
      Convenience method to set the clip plane and the dragger position, orientation and size. The clip plane will be the plane defined by planeNormal and the point at the center of box .

      The dragger will be positioned at the center of box . The size of the dragger geometry will be the default size multiplied by a scale factor. This scale factor is the largest dimension of box multiplied by draggerScaleFactor . The default extent of the main part of SoJackDragger is 2, because it extends from -1 to 1 (note that the "arms" of this dragger extend further). Therefore to make the dragger fit inside the specified box, the draggerScaleFactor parameter should be set to 0.5.

    • replaceNode

      public boolean replaceNode(SoPath p)
      Replaces a regular SoClipPlane node with this manipulator.
    • getDragger

      public SoDragger getDragger()
      Returns the dragger node being employed by this manip.