org.jmol.viewer

Class TransformManager11

class TransformManager11 extends TransformManager

Field Summary
booleanisNavigationCentered
intmultiplier
floatnavigationSlabOffset
intnavMode
intnHits
static intNAV_MODE_NEWXY
static intNAV_MODE_NEWXYZ
static intNAV_MODE_NEWZ
static intNAV_MODE_NONE
static intNAV_MODE_RESET
static intNAV_MODE_ZOOMED
floatpreviousX
floatpreviousY
floatprevZoomSetting
floatzoomFactor
Constructor Summary
TransformManager11()
TransformManager11(Viewer viewer)
TransformManager11(Viewer viewer, int width, int height)
Method Summary
protected voidadjustTemporaryScreenPoint()
voidalignZX(Point3f pt0, Point3f pt1, Point3f ptVectorWing)
brings pt0-pt1 vector to [0 0 -1], then rotates about [0 0 1] until ptVectorWing is in xz plane
protected voidcalcCameraFactors()
protected voidcalcNavigationPoint()
All the magic happens here.
protected voidcalcNavigationSlabAndDepth()
booleancanNavigate()
Point3fgetNavigationCenter()
floatgetNavigationDepthPercent()
Point3fgetNavigationOffset()
floatgetNavigationOffsetPercent(char XorY)
floatgetNavigationSlabOffsetPercent()
protected StringgetNavigationState()
protected StringgetNavigationText(boolean addComments)
protected floatgetPerspectiveFactor(float z)
booleanisNavigationCentered()
voidnavigate(int keyCode, int modifiers)
voidnavigate(float seconds, Point3f pt)
voidnavigate(float seconds, Vector3f rotAxis, float degrees)
voidnavigate(float seconds, Point3f[][] pathGuide)
voidnavigate(float seconds, Point3f[] path, float[] theta, int indexStart, int indexEnd)
voidnavigate(float seconds, Point3f[][] pathGuide, Point3f[] path, float[] theta, int indexStart, int indexEnd)
voidnavigateTo(float floatSecondsTotal, Vector3f axis, float degrees, Point3f center, float depthPercent, float xTrans, float yTrans)
voidnavTranslate(float seconds, Point3f pt)
voidnavTranslatePercent(float seconds, float x, float y)
voidnewNavigationCenter()
We do not want the fixed navigation offset to change, but we need a new model-based equivalent position.
protected voidresetNavigationPoint(boolean doResetSlab)
voidsetNavigationDepthPercent(float timeSec, float percent)
voidsetNavigationDepthPercent(float percent)
voidsetNavigationSlabOffsetPercent(float percent)

Field Detail

isNavigationCentered

boolean isNavigationCentered

multiplier

private int multiplier

navigationSlabOffset

private float navigationSlabOffset

navMode

private int navMode

nHits

private int nHits

NAV_MODE_NEWXY

private static final int NAV_MODE_NEWXY

NAV_MODE_NEWXYZ

private static final int NAV_MODE_NEWXYZ

NAV_MODE_NEWZ

private static final int NAV_MODE_NEWZ

NAV_MODE_NONE

private static final int NAV_MODE_NONE

NAV_MODE_RESET

private static final int NAV_MODE_RESET

NAV_MODE_ZOOMED

private static final int NAV_MODE_ZOOMED

previousX

private float previousX

previousY

private float previousY

prevZoomSetting

private float prevZoomSetting

zoomFactor

private float zoomFactor

Constructor Detail

TransformManager11

TransformManager11()

TransformManager11

TransformManager11(Viewer viewer)

TransformManager11

TransformManager11(Viewer viewer, int width, int height)

Method Detail

adjustTemporaryScreenPoint

protected void adjustTemporaryScreenPoint()

alignZX

private void alignZX(Point3f pt0, Point3f pt1, Point3f ptVectorWing)
brings pt0-pt1 vector to [0 0 -1], then rotates about [0 0 1] until ptVectorWing is in xz plane

Parameters: pt0 pt1 ptVectorWing

calcCameraFactors

protected void calcCameraFactors()

calcNavigationPoint

protected void calcNavigationPoint()
All the magic happens here.

calcNavigationSlabAndDepth

protected void calcNavigationSlabAndDepth()

canNavigate

boolean canNavigate()

getNavigationCenter

Point3f getNavigationCenter()

getNavigationDepthPercent

float getNavigationDepthPercent()

getNavigationOffset

Point3f getNavigationOffset()

getNavigationOffsetPercent

float getNavigationOffsetPercent(char XorY)

getNavigationSlabOffsetPercent

private float getNavigationSlabOffsetPercent()

getNavigationState

protected String getNavigationState()

getNavigationText

protected String getNavigationText(boolean addComments)

getPerspectiveFactor

protected float getPerspectiveFactor(float z)

isNavigationCentered

boolean isNavigationCentered()

navigate

void navigate(int keyCode, int modifiers)

navigate

void navigate(float seconds, Point3f pt)

navigate

void navigate(float seconds, Vector3f rotAxis, float degrees)

navigate

void navigate(float seconds, Point3f[][] pathGuide)

navigate

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

navigate

private void navigate(float seconds, Point3f[][] pathGuide, Point3f[] path, float[] theta, int indexStart, int indexEnd)

navigateTo

private void navigateTo(float floatSecondsTotal, Vector3f axis, float degrees, Point3f center, float depthPercent, float xTrans, float yTrans)

navTranslate

void navTranslate(float seconds, Point3f pt)

navTranslatePercent

void navTranslatePercent(float seconds, float x, float y)

newNavigationCenter

private void newNavigationCenter()
We do not want the fixed navigation offset to change, but we need a new model-based equivalent position. The fixed rotation center is at a fixed offset as well. This means that the navigationCenter must be recalculated based on its former offset in the new context. We have two points, N(navigation) and R(rotation). We know where they ARE: fixedNavigationOffset and fixedRotationOffset. From these we must derive navigationCenter.

resetNavigationPoint

protected void resetNavigationPoint(boolean doResetSlab)

setNavigationDepthPercent

void setNavigationDepthPercent(float timeSec, float percent)

setNavigationDepthPercent

private void setNavigationDepthPercent(float percent)

setNavigationSlabOffsetPercent

void setNavigationSlabOffsetPercent(float percent)