Slice
Date: 2019-10-22

org.openscience.jmol.app.surfacetool

## Class Slice

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

-     class Slice
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `(package private) float` | `anglefromZ`
    `(package private) float` | `angleXY`
    `(package private) javajs.util.P3` | `boundBoxCenter`
    `(package private) javajs.util.P3` | `boundBoxNegCorner`
    `(package private) javajs.util.P3` | `boundBoxPosCorner`
    `(package private) float` | `diagonal`
    `(package private) javajs.util.P4` | `leftPlane`
    `(package private) javajs.util.P4` | `middle`
    `(package private) float` | `position`
    `(package private) javajs.util.P4` | `rightPlane`
    `(package private) float` | `thickness`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Slice()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `(package private) javajs.util.P4` | `getMiddle()`
    `(package private) Slice` | `getSlice()`
    `(package private) static void` | `makePlane(float length, float angleXY, float anglefromZ, javajs.util.P4 result)`
    `(package private) void` | `setSlice(float angleXY, float anglefromZ, float position, float thickness, javajs.util.P3 boundBoxCenter, javajs.util.V3 boundBoxVec, boolean useMolecular)` Sets the right plane and left plane bounding a slice.

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

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

- - ### Field Detail

    - #### leftPlane

          final javajs.util.P4 leftPlane

    - #### middle

          final javajs.util.P4 middle

    - #### rightPlane

          final javajs.util.P4 rightPlane

    - #### angleXY

          float angleXY

    - #### anglefromZ

          float anglefromZ

    - #### position

          float position

    - #### thickness

          float thickness

    - #### boundBoxNegCorner

          final javajs.util.P3 boundBoxNegCorner

    - #### boundBoxPosCorner

          final javajs.util.P3 boundBoxPosCorner

    - #### boundBoxCenter

          final javajs.util.P3 boundBoxCenter

    - #### diagonal

          float diagonal

  - ### Constructor Detail

    - #### Slice

          Slice()

  - ### Method Detail

    - #### makePlane

          static void makePlane(float length,
                                float angleXY,
                                float anglefromZ,
                                javajs.util.P4 result)

      Parameters:
        `length` - (float) length of vector from origin
        `angleXY` - (float) angle of vector projection in XY plane (radians)
        `anglefromZ` - (float) angle of vector from Z axis (radians)
        `result` - (Point4f) meeting the Jmol definition of a plane.

    - #### setSlice

          void setSlice(float angleXY,
                        float anglefromZ,
                        float position,
                        float thickness,
                        javajs.util.P3 boundBoxCenter,
                        javajs.util.V3 boundBoxVec,
                        boolean useMolecular)

      Sets the right plane and left plane bounding a slice.
      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 from origin of slice center along vector in molecular units
        `thickness` - (float) thickness of slice in molecular units.
        `boundBoxCenter` - (Point3f) center of the boundbox in molecular coordinates
        `boundBoxVec` - (Vector3f) vector from the boundbox center to the most positive corner.
        `useMolecular` - (boolean) if true angles and positions are relative to the origin of the molecular coordinate system. If false angles and position are relative to the center of the boundbox, which is usually more intuitive for the vwr as this is typically close to the center of the viewed object.

    - #### getSlice

          Slice getSlice()

      Returns:
        returns this Slice

    - #### getMiddle

          javajs.util.P4 getMiddle()