Class PlaneManipulationPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class PlaneManipulationPanel extends JPanel
A GUI element grouping three main elements for manipulation with a single cutting plane. - spinSlider for shifting the plane - checkBox for controlling visibility of plane - comboBox for switching between orthogonal and symmetry planes Places listeners on the elements and performs operations with stored cutting plane as per user's requests.
See Also:
  • Constructor Details

    • PlaneManipulationPanel

      public PlaneManipulationPanel()
      Constructor
  • Method Details

    • getCurrentPlane

      public DrawableCuttingPlane getCurrentPlane()
    • getPlaneOrientation

      public javax.vecmath.Vector3d getPlaneOrientation()
    • getCurrentPlaneType

      public String getCurrentPlaneType()
      Returns string with information about currently used plane type
      Returns:
      current plane type string
    • setCanvasAndFace

      public void setCanvasAndFace(Canvas canvas, HumanFace face)
      Setter for canvas and face
      Parameters:
      canvas - canvas for storing and showing cutting planes
      face - human face for plane computation
    • createBboxCuttingPlane

      public void createBboxCuttingPlane(javax.vecmath.Vector3d direction)
      Creates DrawableCuttingPlane from BoundingBox of face with given orthogonal normal
      Parameters:
      direction - normal vector of new DrawableCuttingPlane
    • deleteBboxCuttingPlane

      public void deleteBboxCuttingPlane()
      Removes cutting plane from scene
    • isFaceSame

      public boolean isFaceSame(HumanFace face)
      Compares this.face to parameter face
      Parameters:
      face - face to compare this.face to
      Returns:
      true when the two faces are equal, false otherwise
    • createSymmetryCuttingPlane

      protected void createSymmetryCuttingPlane()
      Creates cutting plane from symmetry plane computed in symmetry panel.
    • getMaxPlaneShift

      protected double getMaxPlaneShift()
      Returns a number describing how far can cutting plane be shifted from its origin in direction of its normal, so that it does not exceed bounding box of face.
      Returns:
      max shift value of plane
    • initComponents

      protected final void initComponents()
    • isCheckBoxSelected

      public boolean isCheckBoxSelected()
    • selectCheckBox

      public void selectCheckBox()
      Marks checkbox as selected.
    • getSlider

      public JSlider getSlider()