SurfaceTool
Date: 2019-10-22

org.openscience.jmol.app.surfacetool

## Class SurfaceTool

- java.lang.Object
- - org.openscience.jmol.app.surfacetool.SurfaceTool

-     public class SurfaceTool
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private float` | `anglefromZ`
    `private int` | `angleUnits`
    `private java.lang.String[]` | `angleUnitsList`
    `private float` | `angleXY`
    `private javajs.util.V3` | `boxVec`
    `private boolean` | `capOn`
    `private javajs.util.P3` | `center`
    `(package private) static int` | `CIRCLE_FRACTION`
    `(package private) static int` | `DEGREES`
    `private boolean` | `ghostOn`
    `(package private) static int` | `GRADIANS`
    `private SurfaceToolGUI` | `gui`
    `private boolean` | `leftOn`
    `private javajs.util.P3` | `negCorner`
    `private javajs.util.P3` | `posCorner`
    `private float` | `position`
    `private float` | `positionMin`
    `(package private) static int` | `RADIANS`
    `private boolean` | `rightOn`
    `private Slice` | `slice`
    `private java.util.List<SurfaceStatus>` | `surfaces`
    `private float` | `thickness`
    `private float` | `thicknessMax`
    `(package private) static int` | `UNITS_PI`
    `(package private) boolean` | `useGUI`
    `private boolean` | `useMolecular`
    `private boolean` | `usePercent`
    `protected JmolViewer` | `vwr`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SurfaceTool(JmolViewer vwr, HistoryFile hfile, java.lang.String winName, boolean useGUI)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `private boolean` | `checkMesh(Mesh m)`
    `(package private) BoxInfo` | `checkMeshBB(Shape[] shapes, int kind, BoxInfo box)`
    `private void` | `chooseBestBoundBox()`
    `private void` | `drawSlicePlane(javajs.util.SB cmd, int side, boolean on)`
    `(package private) float` | `getAnglefromZ()`
    `(package private) int` | `getAngleUnits()`
    `(package private) java.lang.String[]` | `getAngleUnitsList()`
    `(package private) javajs.util.V3` | `getBoxVec()`
    `(package private) boolean` | `getCapOn()`
    `(package private) javajs.util.P3` | `getCenter()`
    `(package private) boolean` | `getGhostOn()`
    `(package private) javajs.util.P3` | `getNegCorner()`
    `(package private) javajs.util.P3` | `getPosCorner()`
    `(package private) float` | `getPositionMin()`
    `(package private) float` | `getSliceAngleXY()`
    `(package private) javajs.util.P4` | `getSliceMiddle()`
    `(package private) float` | `getSlicePosition()`
    `(package private) float` | `getSliceThickness()`
    `java.util.List<SurfaceStatus>` | `getSurfaces()`
    `(package private) float` | `getThicknessMax()`
    `(package private) boolean` | `getUseMolecular()`
    `private void` | `initSlice()`
    `(package private) void` | `setAngleUnits(int units)`
    `(package private) void` | `setCapOn(boolean b)`
    `(package private) void` | `setGhostOn(boolean b)`
    `(package private) void` | `setSlice(float angleXY, float anglefromZ, float position, float thickness)` Defines a slice within which isosurfaces (and in future? atoms) are displayed.
    `(package private) void` | `setSliceAnglefromZ(float angle)`
    `(package private) void` | `setSliceAngleXY(float angle)`
    `(package private) void` | `setSlicePosition(float where)`
    `(package private) void` | `setSliceThickness(float width)`
    `(package private) void` | `setSurfaceToolParam()`
    `private void` | `setSyncStarting()`
    `(package private) void` | `setUseMolecular(boolean on)`
    `(package private) void` | `showSliceBoundaryPlanes(boolean onOrOff)`
    `(package private) void` | `sliceObject(java.lang.String objectName, int kind)`
    `private void` | `syncDone()`
    `void` | `toFront()`
    `(package private) void` | `toFrontOrGotFocus()`
    `private void` | `updateMeshInfo(Shape[] shapes, int kind)`
    `(package private) void` | `updateSlices()`
    `private void` | `updateSurfaceInfo()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### gui

          private SurfaceToolGUI gui

    - #### useGUI

          boolean useGUI

    - #### vwr

          protected JmolViewer vwr

    - #### negCorner

          private final javajs.util.P3 negCorner

    - #### posCorner

          private final javajs.util.P3 posCorner

    - #### center

          private final javajs.util.P3 center

    - #### boxVec

          private final javajs.util.V3 boxVec

    - #### surfaces

          private final java.util.List<SurfaceStatus> surfaces

    - #### DEGREES

          static final int DEGREES

      See Also:
        Constant Field Values

    - #### RADIANS

          static final int RADIANS

      See Also:
        Constant Field Values

    - #### GRADIANS

          static final int GRADIANS

      See Also:
        Constant Field Values

    - #### CIRCLE_FRACTION

          static final int CIRCLE_FRACTION

      See Also:
        Constant Field Values

    - #### UNITS_PI

          static final int UNITS_PI

      See Also:
        Constant Field Values

    - #### angleUnits

          private int angleUnits

    - #### angleUnitsList

          private java.lang.String[] angleUnitsList

    - #### angleXY

          private float angleXY

    - #### anglefromZ

          private float anglefromZ

    - #### positionMin

          private float positionMin

    - #### position

          private float position

    - #### thickness

          private float thickness

    - #### thicknessMax

          private float thicknessMax

    - #### slice

          private Slice slice

    - #### leftOn

          private boolean leftOn

    - #### rightOn

          private boolean rightOn

    - #### ghostOn

          private boolean ghostOn

    - #### capOn

          private boolean capOn

    - #### useMolecular

          private boolean useMolecular

    - #### usePercent

          private boolean usePercent

  - ### Constructor Detail

    - #### SurfaceTool

          public SurfaceTool(JmolViewer vwr,
                             HistoryFile hfile,
                             java.lang.String winName,
                             boolean useGUI)

  - ### Method Detail

    - #### toFront

          public void toFront()

    - #### toFrontOrGotFocus

          void toFrontOrGotFocus()

    - #### chooseBestBoundBox

          private void chooseBestBoundBox()

    - #### checkMeshBB

          BoxInfo checkMeshBB(Shape[] shapes,
                              int kind,
                              BoxInfo box)

    - #### setSurfaceToolParam

          void setSurfaceToolParam()

    - #### updateSurfaceInfo

          private void updateSurfaceInfo()

    - #### setSyncStarting

          private void setSyncStarting()

    - #### syncDone

          private void syncDone()

    - #### updateMeshInfo

          private void updateMeshInfo(Shape[] shapes,
                                      int kind)

    - #### checkMesh

          private boolean checkMesh(Mesh m)

    - #### setAngleUnits

          void setAngleUnits(int units)

    - #### getNegCorner

          javajs.util.P3 getNegCorner()

    - #### getPosCorner

          javajs.util.P3 getPosCorner()

    - #### initSlice

          private void initSlice()

    - #### showSliceBoundaryPlanes

          void showSliceBoundaryPlanes(boolean onOrOff)

    - #### setSlice

          void setSlice(float angleXY,
                        float anglefromZ,
                        float position,
                        float thickness)

      Defines a slice within which isosurfaces (and in future? atoms) are displayed.
      Parameters:
        `angleXY` - (float)angle in radians from X-axis to projection in XY plane
        `anglefromZ` - (float)angle in radians from z-axis to vector
        `position` - (float) position along direction vector in absolute units
        `thickness` - (float) thickness of slice in absolute units

    - #### setSliceAngleXY

          void setSliceAngleXY(float angle)

      Parameters:
        `angle` - (float) angle from X-axis of projection on XY plane in radians.

    - #### getSliceAngleXY

          float getSliceAngleXY()

    - #### setSliceAnglefromZ

          void setSliceAnglefromZ(float angle)

      Parameters:
        `angle` - (float) angle of vector from Z axis in radians.

    - #### getAnglefromZ

          float getAnglefromZ()

    - #### setSlicePosition

          void setSlicePosition(float where)

      Parameters:
        `where` - (float) position of slice center along direction vector.

    - #### getSlicePosition

          float getSlicePosition()

    - #### setSliceThickness

          void setSliceThickness(float width)

      Parameters:
        `width` - (float) thickness of slice.

    - #### getSliceThickness

          float getSliceThickness()

    - #### updateSlices

          void updateSlices()

    - #### sliceObject

          void sliceObject(java.lang.String objectName,
                           int kind)

    - #### drawSlicePlane

          private void drawSlicePlane(javajs.util.SB cmd,
                                      int side,
                                      boolean on)

    - #### getAngleUnits

          int getAngleUnits()

      Returns:
        (int) possible values: SurfaceTool.RADIANS, SurfaceTool.DEGREES, SurfaceTool.GRADIANS, SurfaceTool.CIRCLE_FRACTION, SurfaceTool.UNITS_PI.

    - #### getGhostOn

          boolean getGhostOn()

      Returns:
        (boolean) true = ghost showing; false = ghost hiding.

    - #### setGhostOn

          void setGhostOn(boolean b)

      Parameters:
        `b` - (boolean) true for ghost on.

    - #### getUseMolecular

          boolean getUseMolecular()

      Returns:
        (boolean) true = using molecular coordinates; false = using boundbox coordinates.

    - #### setUseMolecular

          void setUseMolecular(boolean on)

    - #### getPositionMin

          float getPositionMin()

    - #### getThicknessMax

          float getThicknessMax()

    - #### getCenter

          javajs.util.P3 getCenter()

    - #### getBoxVec

          javajs.util.V3 getBoxVec()

    - #### getSliceMiddle

          javajs.util.P4 getSliceMiddle()

    - #### getAngleUnitsList

          java.lang.String[] getAngleUnitsList()

    - #### getCapOn

          boolean getCapOn()

    - #### setCapOn

          void setCapOn(boolean b)

    - #### getSurfaces

          public java.util.List<SurfaceStatus> getSurfaces()