ShapeManager
Date: 2019-10-22

org.jmol.viewer

## Class ShapeManager

- java.lang.Object
- - org.jmol.viewer.ShapeManager

-     public class ShapeManager
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `javajs.util.BS` | `bsRenderableAtoms`
    `javajs.util.BS` | `bsSlabbedInternal`
    `private static int` | `clickableMax`
    `private static int[]` | `hoverable`
    `private ModelSet` | `ms`
    `private int[]` | `navMinMax`
    `Shape[]` | `shapes`
    `Viewer` | `vwr`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ShapeManager(Viewer vwr)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `(package private) boolean` | `checkFrankclicked(int x, int y)`
    `void` | `checkInheritedShapes()` starting with Jmol 13.1.13, isosurfaces can use "property color" to inherit the color of the underlying atoms.
    `(package private) java.util.Map<java.lang.String,java.lang.Object>` | `checkObjectClicked(int x, int y, int modifiers, javajs.util.BS bsVisible, boolean drawPicking)`
    `(package private) boolean` | `checkObjectDragged(int prevX, int prevY, int x, int y, int modifiers, javajs.util.BS bsVisible, int iShape)`
    `(package private) boolean` | `checkObjectHovered(int x, int y, javajs.util.BS bsVisible, boolean checkBonds)`
    `void` | `deleteShapeAtoms(java.lang.Object[] value, javajs.util.BS bs)`
    `(package private) void` | `deleteVdwDependentShapes(javajs.util.BS bs)`
    `int[]` | `finalizeAtoms(javajs.util.BS bsTranslateSelected, boolean finalizeParams)`
    `void` | `findNearestShapeAtomIndex(int x, int y, Atom[] closest, javajs.util.BS bsNot)`
    `float` | `getAtomShapeValue(int tok, Group group, int atomIndex)`
    `(package private) void` | `getObjectMap(java.util.Map<java.lang.String,?> map, boolean withDollar)`
    `(package private) java.lang.Object` | `getProperty(java.lang.Object paramInfo)`
    `Shape` | `getShape(int i)`
    `int` | `getShapeIdFromObjectName(java.lang.String objectName)` Returns the shape type index for a shape object given the object name.
    `boolean` | `getShapePropertyData(int shapeID, java.lang.String propertyName, java.lang.Object[] data)`
    `java.lang.Object` | `getShapePropertyIndex(int shapeID, java.lang.String propertyName, int index)`
    `void` | `loadDefaultShapes(ModelSet newModelSet)`
    `Shape` | `loadShape(int shapeID)`
    `void` | `notifyAtomPositionsChanged(int baseModel, javajs.util.BS bs, javajs.util.M4 mat)`
    `void` | `releaseShape(int shapeID)`
    `void` | `replaceGroup(Group g0, Group g1)`
    `void` | `resetBioshapes(javajs.util.BS bsAllAtoms)`
    `void` | `resetShapes()`
    `void` | `restrictSelected(boolean isBond, boolean doInvert)`
    `void` | `setAtomLabel(java.lang.String strLabel, int i)`
    `void` | `setLabel(java.lang.Object strLabel, javajs.util.BS bsSelection)`
    `void` | `setModelSet(ModelSet modelSet)`
    `(package private) void` | `setModelVisibility()` Sets shape visibility flags, including ATOM_VIS_INFRAME and ATOM_VIS_NOTHIDDEN.
    `void` | `setParallel()`
    `void` | `setShapePropertyBs(int shapeID, java.lang.String propertyName, java.lang.Object value, javajs.util.BS bsSelected)`
    `void` | `setShapeSizeBs(int shapeID, int size, RadiusData rd, javajs.util.BS bsSelected)`
    `private void` | `setShapeVis()`

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

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

- - ### Field Detail

    - #### ms

          private ModelSet ms

    - #### shapes

          public Shape[] shapes

    - #### vwr

          public Viewer vwr

    - #### hoverable

          private static final int[] hoverable

    - #### clickableMax

          private static int clickableMax

    - #### bsRenderableAtoms

          public final javajs.util.BS bsRenderableAtoms

    - #### bsSlabbedInternal

          public final javajs.util.BS bsSlabbedInternal

    - #### navMinMax

          private final int[] navMinMax

  - ### Constructor Detail

    - #### ShapeManager

          public ShapeManager(Viewer vwr)

  - ### Method Detail

    - #### setParallel

          public void setParallel()

    - #### findNearestShapeAtomIndex

          public void findNearestShapeAtomIndex(int x,
                                                int y,
                                                Atom[] closest,
                                                javajs.util.BS bsNot)

    - #### getShapePropertyIndex

          public java.lang.Object getShapePropertyIndex(int shapeID,
                                                        java.lang.String propertyName,
                                                        int index)

    - #### getShapePropertyData

          public boolean getShapePropertyData(int shapeID,
                                              java.lang.String propertyName,
                                              java.lang.Object[] data)

    - #### getShapeIdFromObjectName

          public int getShapeIdFromObjectName(java.lang.String objectName)

      Returns the shape type index for a shape object given the object name.
      Parameters:
        `objectName` - (string) string name of object
      Returns:
        shapeType (int) integer corresponding to the shape type index see ShapeManager.shapes[].

    - #### loadDefaultShapes

          public void loadDefaultShapes(ModelSet newModelSet)

    - #### loadShape

          public Shape loadShape(int shapeID)

    - #### notifyAtomPositionsChanged

          public void notifyAtomPositionsChanged(int baseModel,
                                                 javajs.util.BS bs,
                                                 javajs.util.M4 mat)

    - #### releaseShape

          public void releaseShape(int shapeID)

    - #### resetShapes

          public void resetShapes()

    - #### setShapeSizeBs

          public void setShapeSizeBs(int shapeID,
                                     int size,
                                     RadiusData rd,
                                     javajs.util.BS bsSelected)

      Parameters:
        `shapeID` -
        `size` - in milliangstroms
        `rd` -
        `bsSelected` -

    - #### setLabel

          public void setLabel(java.lang.Object strLabel,
                               javajs.util.BS bsSelection)

    - #### setShapePropertyBs

          public void setShapePropertyBs(int shapeID,
                                         java.lang.String propertyName,
                                         java.lang.Object value,
                                         javajs.util.BS bsSelected)

    - #### checkFrankclicked

          boolean checkFrankclicked(int x,
                                    int y)

    - #### checkObjectClicked

          java.util.Map<java.lang.String,java.lang.Object> checkObjectClicked(int x,
                                                                              int y,
                                                                              int modifiers,
                                                                              javajs.util.BS bsVisible,
                                                                              boolean drawPicking)

    - #### checkObjectDragged

          boolean checkObjectDragged(int prevX,
                                     int prevY,
                                     int x,
                                     int y,
                                     int modifiers,
                                     javajs.util.BS bsVisible,
                                     int iShape)

    - #### checkObjectHovered

          boolean checkObjectHovered(int x,
                                     int y,
                                     javajs.util.BS bsVisible,
                                     boolean checkBonds)

    - #### deleteShapeAtoms

          public void deleteShapeAtoms(java.lang.Object[] value,
                                       javajs.util.BS bs)

    - #### deleteVdwDependentShapes

          void deleteVdwDependentShapes(javajs.util.BS bs)

    - #### getAtomShapeValue

          public float getAtomShapeValue(int tok,
                                         Group group,
                                         int atomIndex)

    - #### replaceGroup

          public void replaceGroup(Group g0,
                                   Group g1)

    - #### getObjectMap

          void getObjectMap(java.util.Map<java.lang.String,?> map,
                            boolean withDollar)

    - #### getProperty

          java.lang.Object getProperty(java.lang.Object paramInfo)

    - #### getShape

          public Shape getShape(int i)

    - #### resetBioshapes

          public void resetBioshapes(javajs.util.BS bsAllAtoms)

    - #### setAtomLabel

          public void setAtomLabel(java.lang.String strLabel,
                                   int i)

    - #### setModelVisibility

          void setModelVisibility()

      Sets shape visibility flags, including ATOM_VIS_INFRAME and ATOM_VIS_NOTHIDDEN.

    - #### setShapeVis

          private void setShapeVis()

    - #### finalizeAtoms

          public int[] finalizeAtoms(javajs.util.BS bsTranslateSelected,
                                     boolean finalizeParams)

    - #### setModelSet

          public void setModelSet(ModelSet modelSet)

    - #### checkInheritedShapes

          public void checkInheritedShapes()

      starting with Jmol 13.1.13, isosurfaces can use "property color" to inherit the color of the underlying atoms. This is then dynamic

    - #### restrictSelected

          public void restrictSelected(boolean isBond,
                                       boolean doInvert)