org.jmol.viewer

Class TransformManager

abstract class TransformManager extends Object

Nested Class Summary
classTransformManager.SpinThread
classTransformManager.VibrationThread
Field Summary
protected AxisAngle4faaMoveTo
protected AxisAngle4faaStep
protected Vector3faaStepCenter
protected Vector3faaStepNavCenter
protected AxisAngle4faaTest1
protected AxisAngle4faaTotal
booleanantialias
AxisAngle4faxisangleT
protected floatcameraDepth
protected floatcameraDepthSetting
protected floatcameraDistance
protected floatcameraScaleFactor
static floatdegreesPerRadian
intdepthPercentSetting
Point4fdepthPlane
intdepthValue
protected AxisAngle4ffixedRotationAxis
protected Point3ffixedRotationCenter
protected Point3ffixedRotationOffset
protected Point3ffixedTranslation
protected booleanhaveNotifiedNaN
intheight
floatinternalRotationAngle
protected AxisAngle4finternalRotationAxis
Point3finternalRotationCenter
booleaninternalSlab
protected booleanisNavigationMode
booleanisSpinFixed
booleanisSpinInternal
booleanisSpinSelected
protected Matrix3fmatrixEnd
protected Matrix3fmatrixRotate
protected Matrix3fmatrixStart
Matrix3fmatrixStartInv
protected Matrix3fmatrixStep
protected Matrix3fmatrixStereo
protected Matrix4fmatrixTemp
Matrix3fmatrixTemp3
Matrix4fmatrixTemp4
protected Matrix3fmatrixTest
protected Matrix4fmatrixTransform
protected floatmodelCenterOffset
protected floatmodelRadius
protected floatmodelRadiusPixels
static intMAXIMUM_ZOOM_PERCENTAGE
static intMAXIMUM_ZOOM_PERSPECTIVE_DEPTH
protected booleannavigating
protected Point3fnavigationCenter
protected Point3fnavigationOffset
protected Point3fnavigationShiftXY
protected booleanperspectiveDepth
protected intperspectiveModel
protected Point3fpoint3fScreenTemp
Point3fpoint3fVibrationTemp
protected Point3ipoint3iScreenTemp
protected Point3fpointT
Point3fpointT2
protected Point3fptMoveToCenter
protected Point3fptTest1
protected Point3fptTest2
protected Point3fptTest3
static floatradiansPerDegree
protected floatreferencePlaneOffset
booleanrotateMolecule
Vector3frotationAxis
Point3frotationCenterDefault
floatrotationRadiusDefault
floatrotationRate
protected booleanscale3D
floatscale3DAngstromsPerInch
floatscaleDefaultPixelsPerAngstrom
floatscalePixelsPerAngstrom
intscreenHeight
intscreenPixelCount
intscreenWidth
booleanslabEnabled
intslabPercentSetting
Point4fslabPlane
intslabValue
floatspinFps
protected booleanspinOn
TransformManager.SpinThreadspinThread
floatspinX
floatspinY
floatspinZ
int[]stereoColors
floatstereoDegrees
booleanstereoFrame
intstereoMode
floatstereoRadians
static floattwoPI
booleanuseZoomLarge
Vector3fvectorT
Vector3fvectorT2
protected Vector3fvectorTemp
floatvibrationAmplitude
booleanvibrationOn
floatvibrationPeriod
intvibrationPeriodMs
floatvibrationRadians
floatvibrationScale
TransformManager.VibrationThreadvibrationThread
Viewerviewer
protected floatvisualRange
intwidth
booleanwindowCentered
floatxTranslationFraction
floatyTranslationFraction
booleanzoomEnabled
floatzoomPercent
floatzoomPercentSetting
floatzoomRatio
Constructor Summary
TransformManager()
TransformManager(Viewer viewer)
TransformManager(Viewer viewer, int width, int height)
Method Summary
voidaddZoomTranslationNavigationText(StringBuffer sb)
abstract voidadjustTemporaryScreenPoint()
adjusts the temporary point for perspective and offsets
voidapplyRotation(Matrix3f mNew, boolean isInternal, BitSet bsAtoms)
protected abstract voidcalcCameraFactors()
sets all camera and scale factors needed by the specific perspective model instantiated
protected voidcalcNavigationPoint()
all navigation effects go through this method
protected voidcalcSlabAndDepthValues()
sets slab and depth, possibly using visual range considerations for setting the slab-clipping plane. (slab on; slab 0) superceded in navigation mode
protected voidcalcTransformMatrix()
booleancanNavigate()
booleancheckInternalSlab(Point3f pt)
voidclear()
voidclearSpin()
voidclearVibration()
floatdefaultScaleToScreen(float radius)
voiddepthByPercentagePoints(int percentage)
voiddepthToPercent(int percentDepth)
voidfinalizeTransformParameters()
voidgetAxisAngle(AxisAngle4f axisAngle)
StringgetCenterText()
Matrix3fgetMatrixRotate()
Matrix4fgetMatrixtransform()
StringgetMoveToText(float timespan, boolean addComments)
booleangetNavigating()
Point3fgetNavigationCenter()
floatgetNavigationDepthPercent()
TransformManagergetNavigationManager(Viewer viewer, int width, int height)
Point3fgetNavigationOffset()
floatgetNavigationOffsetPercent(char XorY)
protected StringgetNavigationState()
StringgetNavigationText(boolean addComments)
voidgetNewFixedRotationCenter()
HashtablegetOrientationInfo()
StringgetOrientationText(int type)
booleangetPerspectiveDepth()
protected abstract floatgetPerspectiveFactor(float z)
calculate the perspective factor based on z
StringgetRotateXyzText()
StringgetRotateZyzText(boolean iAddComment)
voidgetRotation(Matrix3f matrixRotation)
Point3fgetRotationCenter()
floatgetRotationRadius()
StringgetRotationText(boolean asQuaternion)
Point4fgetSlabDepthPlane(boolean isDepth)
intgetSlabPercentSetting()
booleangetSpinOn()
StringgetSpinState(boolean isAll)
StringgetState(StringBuffer sfunc)
Matrix3fgetStereoRotationMatrix(boolean stereoFrame)
StringgetTransformText()
StringgetTranslationScript()
floatgetTranslationXPercent()
floatgetTranslationYPercent()
floatgetTranslationZPercent()
Matrix4fgetUnscaledTransformMatrix()
floatgetZoomPercentFloat()
floatgetZoomSetting()
voidhomePosition()
booleanisInPosition(Point3f pt, float degrees)
booleanisNavigationCentered()
booleanisVibrationOn()
booleanisWindowCentered()
protected voidmatrixUnTransform(Point3f screen, Point3f angstroms)
voidmove(Vector3f dRot, float dZoom, Vector3f dTrans, float dSlab, float floatSecondsTotal, int fps)
voidmoveRotationCenter(Point3f center, boolean toXY)
voidmoveTo(float floatSecondsTotal, Point3f center, Point3f pt, float degrees, float zoom, float xTrans, float yTrans, float newRotationRadius, Point3f navCenter, float xNav, float yNav, float navDepth)
voidmoveTo(float floatSecondsTotal, Matrix3f end, Point3f center, float zoom, float xTrans, float yTrans, float newRotationRadius, Point3f navCenter, float xNav, float yNav, float navDepth)
voidnavigate(int keyCode, int modifiers)
entry point for keyboard-based navigation
voidnavigate(float seconds, Point3f center)
scripted entry point for navigation
voidnavigate(float seconds, Vector3f rotAxis, float degrees)
scripted entry point for navigation
voidnavigate(float seconds, Point3f[] path, float[] theta, int indexStart, int indexEnd)
scripted navigation
voidnavigate(float timeSeconds, Point3f[][] pathGuide)
follows a path guided by orientation and offset vectors (as Point3fs)
voidnavTranslate(float seconds, Point3f pt)
scripted entry point for navigation
voidnavTranslatePercent(float seconds, float x, float y)
scripted entry point for navigation
protected voidresetNavigationPoint(boolean doResetSlab)
something has arisen that requires resetting of the navigation point.
voidrotateAboutPointsInternal(Point3f point1, Point3f point2, float degrees, float endDegrees, boolean isClockwise, boolean isSpin, BitSet bsAtoms)
protected voidrotateAxisAngle(Vector3f rotAxis, float radians)
voidrotateAxisAngle(AxisAngle4f axisAngle, BitSet bsAtoms)
voidrotateAxisAngleAtCenter(Point3f rotCenter, Vector3f rotAxis, float degrees, float endDegrees, boolean isSpin, BitSet bsAtoms)
voidrotateAxisAngleRadiansFixed(float angleRadians, BitSet bsAtoms)
voidrotateAxisAngleRadiansInternal(float radians, BitSet bsAtoms)
voidrotateFront()
voidrotatePoint(Point3f pt, Point3f ptRot)
voidrotateX(float angleRadians)
voidrotateXRadians(float angleRadians, BitSet bsAtoms)
voidrotateXYBy(int xDelta, int yDelta, BitSet bsAtoms)
voidrotateY(float angleRadians)
voidrotateYRadians(float angleRadians, BitSet bsAtoms)
voidrotateZ(float angleRadians)
voidrotateZBy(int zDelta)
voidrotateZRadians(float angleRadians)
voidscaleFitToScreen(boolean andCenter)
voidscaleFitToScreen(boolean andCenter, boolean zoomLarge, boolean resetSlab, boolean resetZoom)
floatscaleToPerspective(int z, float sizeAngstroms)
shortscaleToScreen(int z, int milliAngstroms)
voidsetAntialias(boolean TF)
voidsetCameraDepthPercent(float percent)
either as a percent -300, or as a float 3.0 note this percent is of zoom=100 size of model
voidsetCenter()
voidsetCenterAt(String relativeTo, Point3f pt)
voidsetFixedRotationCenter(Point3f center)
voidsetNavigationDepthPercent(float timeSec, float percent)
sets the position of the navigation offset relative to the model (50% center; 0% rear, 100% front; can be <0 or >100)
voidsetNavigationMode(boolean TF)
voidsetNavigationSlabOffsetPercent(float offset)
voidsetNewRotationCenter(Point3f center, boolean doScale)
voidsetPerspectiveDepth(boolean perspectiveDepth)
floatsetRotateFixed(Point3f center, Vector3f axis, float degrees)
floatsetRotateInternal(Point3f center, Vector3f axis, float degrees)
voidsetRotateMolecule(boolean TF)
voidsetRotation(Matrix3f matrixRotation)
voidsetRotationCenterAndRadiusXYZ(Point3f newCenterOfRotation, boolean andRadius)
voidsetRotationCenterAndRadiusXYZ(String relativeTo, Point3f pt)
voidsetRotationPointXY(Point3f center)
floatsetRotationRadius(float angstroms, boolean doAll)
voidsetScaleAngstromsPerInch(float angstromsPerInch)
voidsetScreenParameters(int screenWidth, int screenHeight, boolean useZoomLarge, boolean antialias, boolean resetSlab, boolean resetZoom)
voidsetSlabDepthInternal(boolean isDepth)
set internal slab or depth from screen-based slab or depth
voidsetSlabEnabled(boolean slabEnabled)
voidsetSpinFps(int value)
voidsetSpinOn(boolean spinOn)
voidsetSpinOn(boolean spinOn, float endDegrees, BitSet bsAtoms)
voidsetSpinX(float degrees)
voidsetSpinY(float degrees)
voidsetSpinZ(float degrees)
voidsetStereoDegrees(float stereoDegrees)
voidsetStereoMode(int[] twoColors)
voidsetStereoMode(int stereoMode)
voidsetTranslationFractions()
voidsetVibrationOn(boolean vibrationOn)
voidsetVibrationPeriod(float period)
sets the period of vibration -- period > 0: sets the period and turns vibration on -- period < 0: sets the period but does not turn vibration on -- period = 0: sets the period to zero and turns vibration off -- period Float.NaN: uses current setting (frame change)
voidsetVibrationScale(float scale)
protected voidsetVibrationT(float t)
voidsetViewer(Viewer viewer, int width, int height)
voidsetVisualRange(float angstroms)
voidsetWindowCentered(boolean TF)
voidsetZoomEnabled(boolean zoomEnabled)
voidslabByPercentagePoints(int percentage)
voidslabDepthByPercentagePoints(int percentage)
voidslabInternal(Point4f plane, boolean isDepth)
voidslabReset()
voidslabToPercent(int percentSlab)
voidtransformPoint(Point3f pointAngstroms, Point3i pointScreen)
Point3itransformPoint(Point3f pointAngstroms)
CAUTION!
Point3itransformPoint(Point3f pointAngstroms, Vector3f vibrationVector)
voidtransformPoint(Point3f pointAngstroms, Point3f screen)
voidtransformPointNoClip(Point3f pointAngstroms, Point3f pointScreen)
Point3ftransformPointNoClip(Point3f pointAngstroms)
CAUTION!
voidtransformPoints(int count, Point3f[] angstroms, Point3i[] screens)
Point3itransformScreenPoint(Point3f ptXyp)
voidtransformVector(Vector3f vectorAngstroms, Vector3f vectorTransformed)
voidtranslateToXPercent(float percent)
voidtranslateToYPercent(float percent)
voidtranslateToZPercent(float percent)
voidtranslateXYBy(int xDelta, int yDelta)
static voidtruncate0(StringBuffer sb, float val)
static voidtruncate2(StringBuffer sb, float val)
voidunTransformPoint(Point3f screenPt, Point3f coordPt)
protected voidzoomBy(int pixels)
standard response to user mouse vertical shift-drag
voidzoomByFactor(float factor)
voidzoomByPercent(float percentZoom)
voidzoomToPercent(float percentZoom)
intzValueFromPercent(int zPercent)

Field Detail

aaMoveTo

protected final AxisAngle4f aaMoveTo

aaStep

protected final AxisAngle4f aaStep

aaStepCenter

protected final Vector3f aaStepCenter

aaStepNavCenter

protected final Vector3f aaStepNavCenter

aaTest1

protected final AxisAngle4f aaTest1

aaTotal

protected final AxisAngle4f aaTotal

antialias

private boolean antialias

axisangleT

private final AxisAngle4f axisangleT

cameraDepth

protected float cameraDepth

cameraDepthSetting

protected float cameraDepthSetting

cameraDistance

protected float cameraDistance

cameraScaleFactor

protected float cameraScaleFactor

degreesPerRadian

static final float degreesPerRadian

depthPercentSetting

int depthPercentSetting

depthPlane

Point4f depthPlane

depthValue

int depthValue

fixedRotationAxis

protected final AxisAngle4f fixedRotationAxis

fixedRotationCenter

protected final Point3f fixedRotationCenter

fixedRotationOffset

protected final Point3f fixedRotationOffset

fixedTranslation

protected final Point3f fixedTranslation

haveNotifiedNaN

protected boolean haveNotifiedNaN

height

int height

internalRotationAngle

private float internalRotationAngle

internalRotationAxis

protected final AxisAngle4f internalRotationAxis

internalRotationCenter

private final Point3f internalRotationCenter

internalSlab

boolean internalSlab

isNavigationMode

protected boolean isNavigationMode

isSpinFixed

boolean isSpinFixed

isSpinInternal

boolean isSpinInternal

isSpinSelected

boolean isSpinSelected

matrixEnd

protected final Matrix3f matrixEnd

matrixRotate

protected final Matrix3f matrixRotate

matrixStart

protected final Matrix3f matrixStart

matrixStartInv

private final Matrix3f matrixStartInv

matrixStep

protected final Matrix3f matrixStep

matrixStereo

protected final Matrix3f matrixStereo

matrixTemp

protected final Matrix4f matrixTemp

matrixTemp3

private final Matrix3f matrixTemp3

matrixTemp4

private final Matrix4f matrixTemp4

matrixTest

protected final Matrix3f matrixTest

matrixTransform

protected final Matrix4f matrixTransform

modelCenterOffset

protected float modelCenterOffset

modelRadius

protected float modelRadius

modelRadiusPixels

protected float modelRadiusPixels

MAXIMUM_ZOOM_PERCENTAGE

static final int MAXIMUM_ZOOM_PERCENTAGE

MAXIMUM_ZOOM_PERSPECTIVE_DEPTH

static final int MAXIMUM_ZOOM_PERSPECTIVE_DEPTH

navigating

protected boolean navigating

navigationCenter

protected final Point3f navigationCenter

navigationOffset

protected final Point3f navigationOffset

navigationShiftXY

protected final Point3f navigationShiftXY

perspectiveDepth

protected boolean perspectiveDepth

perspectiveModel

protected int perspectiveModel

point3fScreenTemp

protected final Point3f point3fScreenTemp

point3fVibrationTemp

private final Point3f point3fVibrationTemp

point3iScreenTemp

protected final Point3i point3iScreenTemp

pointT

protected final Point3f pointT

pointT2

private final Point3f pointT2

ptMoveToCenter

protected Point3f ptMoveToCenter

ptTest1

protected final Point3f ptTest1

ptTest2

protected final Point3f ptTest2

ptTest3

protected final Point3f ptTest3

radiansPerDegree

static final float radiansPerDegree

referencePlaneOffset

protected float referencePlaneOffset

rotateMolecule

private boolean rotateMolecule

rotationAxis

Vector3f rotationAxis

rotationCenterDefault

private final Point3f rotationCenterDefault

rotationRadiusDefault

private float rotationRadiusDefault

rotationRate

float rotationRate

scale3D

protected boolean scale3D

scale3DAngstromsPerInch

float scale3DAngstromsPerInch

scaleDefaultPixelsPerAngstrom

float scaleDefaultPixelsPerAngstrom

scalePixelsPerAngstrom

float scalePixelsPerAngstrom

screenHeight

int screenHeight

screenPixelCount

int screenPixelCount

screenWidth

int screenWidth

slabEnabled

boolean slabEnabled

slabPercentSetting

int slabPercentSetting

slabPlane

Point4f slabPlane

slabValue

int slabValue

spinFps

float spinFps

spinOn

protected boolean spinOn

spinThread

private TransformManager.SpinThread spinThread

spinX

float spinX

spinY

float spinY

spinZ

float spinZ

stereoColors

int[] stereoColors

stereoDegrees

float stereoDegrees

stereoFrame

boolean stereoFrame

stereoMode

int stereoMode

stereoRadians

float stereoRadians

twoPI

static final float twoPI

useZoomLarge

private boolean useZoomLarge

vectorT

private final Vector3f vectorT

vectorT2

private final Vector3f vectorT2

vectorTemp

protected final Vector3f vectorTemp

vibrationAmplitude

private float vibrationAmplitude

vibrationOn

boolean vibrationOn

vibrationPeriod

private float vibrationPeriod

vibrationPeriodMs

public int vibrationPeriodMs

vibrationRadians

private float vibrationRadians

vibrationScale

private float vibrationScale

vibrationThread

private TransformManager.VibrationThread vibrationThread

viewer

Viewer viewer

visualRange

protected float visualRange

width

int width

windowCentered

boolean windowCentered

xTranslationFraction

float xTranslationFraction

yTranslationFraction

float yTranslationFraction

zoomEnabled

boolean zoomEnabled

zoomPercent

float zoomPercent

zoomPercentSetting

float zoomPercentSetting

zoomRatio

float zoomRatio

Constructor Detail

TransformManager

TransformManager()

TransformManager

TransformManager(Viewer viewer)

TransformManager

TransformManager(Viewer viewer, int width, int height)

Method Detail

addZoomTranslationNavigationText

private void addZoomTranslationNavigationText(StringBuffer sb)

adjustTemporaryScreenPoint

abstract void adjustTemporaryScreenPoint()
adjusts the temporary point for perspective and offsets

applyRotation

private void applyRotation(Matrix3f mNew, boolean isInternal, BitSet bsAtoms)

calcCameraFactors

protected abstract void calcCameraFactors()
sets all camera and scale factors needed by the specific perspective model instantiated

calcNavigationPoint

protected void calcNavigationPoint()
all navigation effects go through this method

calcSlabAndDepthValues

protected void calcSlabAndDepthValues()
sets slab and depth, possibly using visual range considerations for setting the slab-clipping plane. (slab on; slab 0) superceded in navigation mode

calcTransformMatrix

protected void calcTransformMatrix()

canNavigate

boolean canNavigate()

checkInternalSlab

boolean checkInternalSlab(Point3f pt)

clear

void clear()

clearSpin

private void clearSpin()

clearVibration

private void clearVibration()

defaultScaleToScreen

private float defaultScaleToScreen(float radius)

depthByPercentagePoints

void depthByPercentagePoints(int percentage)

depthToPercent

void depthToPercent(int percentDepth)

finalizeTransformParameters

void finalizeTransformParameters()

getAxisAngle

void getAxisAngle(AxisAngle4f axisAngle)

getCenterText

private String getCenterText()

getMatrixRotate

Matrix3f getMatrixRotate()

getMatrixtransform

Matrix4f getMatrixtransform()

getMoveToText

String getMoveToText(float timespan, boolean addComments)

getNavigating

boolean getNavigating()

getNavigationCenter

Point3f getNavigationCenter()

getNavigationDepthPercent

float getNavigationDepthPercent()

getNavigationManager

TransformManager getNavigationManager(Viewer viewer, int width, int height)

getNavigationOffset

Point3f getNavigationOffset()

getNavigationOffsetPercent

float getNavigationOffsetPercent(char XorY)

getNavigationState

protected String getNavigationState()

Returns: the script that defines the current navigation state

getNavigationText

String getNavigationText(boolean addComments)

getNewFixedRotationCenter

void getNewFixedRotationCenter()

getOrientationInfo

Hashtable getOrientationInfo()

getOrientationText

String getOrientationText(int type)

getPerspectiveDepth

boolean getPerspectiveDepth()

getPerspectiveFactor

protected abstract float getPerspectiveFactor(float z)
calculate the perspective factor based on z

Parameters: z

Returns: perspectiveFactor

getRotateXyzText

private String getRotateXyzText()

getRotateZyzText

private String getRotateZyzText(boolean iAddComment)

getRotation

void getRotation(Matrix3f matrixRotation)

getRotationCenter

Point3f getRotationCenter()

getRotationRadius

float getRotationRadius()

getRotationText

String getRotationText(boolean asQuaternion)

getSlabDepthPlane

Point4f getSlabDepthPlane(boolean isDepth)

getSlabPercentSetting

int getSlabPercentSetting()

getSpinOn

boolean getSpinOn()

getSpinState

String getSpinState(boolean isAll)

getState

String getState(StringBuffer sfunc)

getStereoRotationMatrix

Matrix3f getStereoRotationMatrix(boolean stereoFrame)

getTransformText

String getTransformText()

getTranslationScript

String getTranslationScript()

getTranslationXPercent

float getTranslationXPercent()

getTranslationYPercent

float getTranslationYPercent()

getTranslationZPercent

float getTranslationZPercent()

getUnscaledTransformMatrix

Matrix4f getUnscaledTransformMatrix()

getZoomPercentFloat

float getZoomPercentFloat()

getZoomSetting

float getZoomSetting()

homePosition

void homePosition()

isInPosition

boolean isInPosition(Point3f pt, float degrees)

isNavigationCentered

boolean isNavigationCentered()

isVibrationOn

boolean isVibrationOn()

isWindowCentered

boolean isWindowCentered()

matrixUnTransform

protected void matrixUnTransform(Point3f screen, Point3f angstroms)

move

void move(Vector3f dRot, float dZoom, Vector3f dTrans, float dSlab, float floatSecondsTotal, int fps)

moveRotationCenter

private void moveRotationCenter(Point3f center, boolean toXY)

moveTo

void moveTo(float floatSecondsTotal, Point3f center, Point3f pt, float degrees, float zoom, float xTrans, float yTrans, float newRotationRadius, Point3f navCenter, float xNav, float yNav, float navDepth)

moveTo

void moveTo(float floatSecondsTotal, Matrix3f end, Point3f center, float zoom, float xTrans, float yTrans, float newRotationRadius, Point3f navCenter, float xNav, float yNav, float navDepth)

navigate

void navigate(int keyCode, int modifiers)
entry point for keyboard-based navigation

Parameters: keyCode 0 indicates key released modifiers shift,alt,ctrl

navigate

void navigate(float seconds, Point3f center)
scripted entry point for navigation

Parameters: seconds center

navigate

void navigate(float seconds, Vector3f rotAxis, float degrees)
scripted entry point for navigation

Parameters: seconds rotAxis degrees

navigate

void navigate(float seconds, Point3f[] path, float[] theta, int indexStart, int indexEnd)
scripted navigation

Parameters: seconds number of seconds to allow for total movement, like moveTo path sequence of points to turn into a hermetian path theta orientation angle along path (0 aligns with window Y axis) [or Z axis if path is vertical] indexStart index of first "station" indexEnd index of last "station" not implemented yet

navigate

void navigate(float timeSeconds, Point3f[][] pathGuide)
follows a path guided by orientation and offset vectors (as Point3fs)

Parameters: timeSeconds pathGuide

navTranslate

void navTranslate(float seconds, Point3f pt)
scripted entry point for navigation

Parameters: seconds pt

navTranslatePercent

void navTranslatePercent(float seconds, float x, float y)
scripted entry point for navigation

Parameters: seconds x y

resetNavigationPoint

protected void resetNavigationPoint(boolean doResetSlab)
something has arisen that requires resetting of the navigation point.

Parameters: doResetSlab

rotateAboutPointsInternal

void rotateAboutPointsInternal(Point3f point1, Point3f point2, float degrees, float endDegrees, boolean isClockwise, boolean isSpin, BitSet bsAtoms)

rotateAxisAngle

protected void rotateAxisAngle(Vector3f rotAxis, float radians)

rotateAxisAngle

void rotateAxisAngle(AxisAngle4f axisAngle, BitSet bsAtoms)

rotateAxisAngleAtCenter

void rotateAxisAngleAtCenter(Point3f rotCenter, Vector3f rotAxis, float degrees, float endDegrees, boolean isSpin, BitSet bsAtoms)

rotateAxisAngleRadiansFixed

void rotateAxisAngleRadiansFixed(float angleRadians, BitSet bsAtoms)

rotateAxisAngleRadiansInternal

void rotateAxisAngleRadiansInternal(float radians, BitSet bsAtoms)

rotateFront

void rotateFront()

rotatePoint

void rotatePoint(Point3f pt, Point3f ptRot)

rotateX

void rotateX(float angleRadians)

rotateXRadians

void rotateXRadians(float angleRadians, BitSet bsAtoms)

rotateXYBy

void rotateXYBy(int xDelta, int yDelta, BitSet bsAtoms)

rotateY

void rotateY(float angleRadians)

rotateYRadians

void rotateYRadians(float angleRadians, BitSet bsAtoms)

rotateZ

void rotateZ(float angleRadians)

rotateZBy

void rotateZBy(int zDelta)

rotateZRadians

void rotateZRadians(float angleRadians)

scaleFitToScreen

void scaleFitToScreen(boolean andCenter)

scaleFitToScreen

void scaleFitToScreen(boolean andCenter, boolean zoomLarge, boolean resetSlab, boolean resetZoom)

scaleToPerspective

float scaleToPerspective(int z, float sizeAngstroms)

scaleToScreen

short scaleToScreen(int z, int milliAngstroms)

setAntialias

void setAntialias(boolean TF)

setCameraDepthPercent

void setCameraDepthPercent(float percent)
either as a percent -300, or as a float 3.0 note this percent is of zoom=100 size of model

Parameters: percent

setCenter

void setCenter()

setCenterAt

void setCenterAt(String relativeTo, Point3f pt)

setFixedRotationCenter

private void setFixedRotationCenter(Point3f center)

setNavigationDepthPercent

void setNavigationDepthPercent(float timeSec, float percent)
sets the position of the navigation offset relative to the model (50% center; 0% rear, 100% front; can be <0 or >100)

Parameters: timeSec percent

setNavigationMode

void setNavigationMode(boolean TF)

setNavigationSlabOffsetPercent

void setNavigationSlabOffsetPercent(float offset)

setNewRotationCenter

void setNewRotationCenter(Point3f center, boolean doScale)

setPerspectiveDepth

void setPerspectiveDepth(boolean perspectiveDepth)

setRotateFixed

float setRotateFixed(Point3f center, Vector3f axis, float degrees)

setRotateInternal

float setRotateInternal(Point3f center, Vector3f axis, float degrees)

setRotateMolecule

void setRotateMolecule(boolean TF)

setRotation

void setRotation(Matrix3f matrixRotation)

setRotationCenterAndRadiusXYZ

private void setRotationCenterAndRadiusXYZ(Point3f newCenterOfRotation, boolean andRadius)

setRotationCenterAndRadiusXYZ

private void setRotationCenterAndRadiusXYZ(String relativeTo, Point3f pt)

setRotationPointXY

void setRotationPointXY(Point3f center)

setRotationRadius

float setRotationRadius(float angstroms, boolean doAll)

setScaleAngstromsPerInch

void setScaleAngstromsPerInch(float angstromsPerInch)

setScreenParameters

void setScreenParameters(int screenWidth, int screenHeight, boolean useZoomLarge, boolean antialias, boolean resetSlab, boolean resetZoom)

setSlabDepthInternal

void setSlabDepthInternal(boolean isDepth)
set internal slab or depth from screen-based slab or depth

Parameters: isDepth

setSlabEnabled

void setSlabEnabled(boolean slabEnabled)

setSpinFps

void setSpinFps(int value)

setSpinOn

void setSpinOn(boolean spinOn)

setSpinOn

private void setSpinOn(boolean spinOn, float endDegrees, BitSet bsAtoms)

setSpinX

void setSpinX(float degrees)

setSpinY

void setSpinY(float degrees)

setSpinZ

void setSpinZ(float degrees)

setStereoDegrees

void setStereoDegrees(float stereoDegrees)

setStereoMode

void setStereoMode(int[] twoColors)

setStereoMode

void setStereoMode(int stereoMode)

setTranslationFractions

void setTranslationFractions()

setVibrationOn

private void setVibrationOn(boolean vibrationOn)

setVibrationPeriod

void setVibrationPeriod(float period)
sets the period of vibration -- period > 0: sets the period and turns vibration on -- period < 0: sets the period but does not turn vibration on -- period = 0: sets the period to zero and turns vibration off -- period Float.NaN: uses current setting (frame change)

Parameters: period

setVibrationScale

void setVibrationScale(float scale)

setVibrationT

protected void setVibrationT(float t)

setViewer

private void setViewer(Viewer viewer, int width, int height)

setVisualRange

void setVisualRange(float angstroms)

setWindowCentered

void setWindowCentered(boolean TF)

setZoomEnabled

void setZoomEnabled(boolean zoomEnabled)

slabByPercentagePoints

void slabByPercentagePoints(int percentage)

slabDepthByPercentagePoints

void slabDepthByPercentagePoints(int percentage)

slabInternal

void slabInternal(Point4f plane, boolean isDepth)

slabReset

void slabReset()

slabToPercent

void slabToPercent(int percentSlab)

transformPoint

void transformPoint(Point3f pointAngstroms, Point3i pointScreen)

transformPoint

Point3i transformPoint(Point3f pointAngstroms)
CAUTION! returns a POINTER TO A TEMPORARY VARIABLE

Parameters: pointAngstroms

Returns: POINTER TO point3iScreenTemp

transformPoint

Point3i transformPoint(Point3f pointAngstroms, Vector3f vibrationVector)

Parameters: pointAngstroms vibrationVector

Returns: POINTER TO TEMPORARY VARIABLE (caution!) point3iScreenTemp

transformPoint

void transformPoint(Point3f pointAngstroms, Point3f screen)

transformPointNoClip

void transformPointNoClip(Point3f pointAngstroms, Point3f pointScreen)

transformPointNoClip

Point3f transformPointNoClip(Point3f pointAngstroms)
CAUTION! returns a POINTER TO A TEMPORARY VARIABLE

Parameters: pointAngstroms

Returns: POINTER TO point3iScreenTemp

transformPoints

void transformPoints(int count, Point3f[] angstroms, Point3i[] screens)

transformScreenPoint

private Point3i transformScreenPoint(Point3f ptXyp)

transformVector

void transformVector(Vector3f vectorAngstroms, Vector3f vectorTransformed)

translateToXPercent

void translateToXPercent(float percent)

translateToYPercent

void translateToYPercent(float percent)

translateToZPercent

void translateToZPercent(float percent)

translateXYBy

void translateXYBy(int xDelta, int yDelta)

truncate0

private static void truncate0(StringBuffer sb, float val)

truncate2

private static void truncate2(StringBuffer sb, float val)

unTransformPoint

void unTransformPoint(Point3f screenPt, Point3f coordPt)

zoomBy

protected void zoomBy(int pixels)
standard response to user mouse vertical shift-drag

Parameters: pixels

zoomByFactor

void zoomByFactor(float factor)

zoomByPercent

void zoomByPercent(float percentZoom)

zoomToPercent

void zoomToPercent(float percentZoom)

zValueFromPercent

int zValueFromPercent(int zPercent)