org.openscience.jmol.app.surfacetool
Class SurfaceTool

java.lang.Object
  extended by org.openscience.jmol.app.surfacetool.SurfaceTool

public class SurfaceTool
extends java.lang.Object


Field Summary
private  float anglefromZ
           
private  int angleUnits
           
private  java.lang.String[] angleUnitsList
           
private  float angleXY
           
private  javax.vecmath.Vector3f boxVec
           
private  boolean capOn
           
private  javax.vecmath.Point3f 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  javax.vecmath.Point3f negCorner
           
private  javax.vecmath.Point3f 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 viewer
           
 
Constructor Summary
SurfaceTool(JmolViewer viewer, HistoryFile hfile, java.lang.String winName, boolean useGUI)
           
 
Method Summary
private  boolean checkMesh(Mesh m)
           
(package private)  BoxInfo checkMeshBB(Shape[] shapes, int kind, BoxInfo box)
           
private  void chooseBestBoundBox()
           
private  void drawSlicePlane(java.lang.StringBuffer cmd, int side, boolean on)
           
(package private)  float getAnglefromZ()
           
(package private)  int getAngleUnits()
           
(package private)  java.lang.String[] getAngleUnitsList()
           
(package private)  javax.vecmath.Vector3f getBoxVec()
           
(package private)  boolean getCapOn()
           
(package private)  javax.vecmath.Point3f getCenter()
           
(package private)  boolean getGhostOn()
           
(package private)  javax.vecmath.Point3f getNegCorner()
           
(package private)  javax.vecmath.Point3f getPosCorner()
           
(package private)  float getPositionMin()
           
(package private)  float getSliceAngleXY()
           
(package private)  javax.vecmath.Point4f 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

viewer

protected JmolViewer viewer

negCorner

private final javax.vecmath.Point3f negCorner

posCorner

private final javax.vecmath.Point3f posCorner

center

private final javax.vecmath.Point3f center

boxVec

private final javax.vecmath.Vector3f 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 viewer,
                   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

javax.vecmath.Point3f getNegCorner()

getPosCorner

javax.vecmath.Point3f 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(java.lang.StringBuffer 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

javax.vecmath.Point3f getCenter()

getBoxVec

javax.vecmath.Vector3f getBoxVec()

getSliceMiddle

javax.vecmath.Point4f getSliceMiddle()

getAngleUnitsList

java.lang.String[] getAngleUnitsList()

getCapOn

boolean getCapOn()

setCapOn

void setCapOn(boolean b)

getSurfaces

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