Class Navigator

All Implemented Interfaces:
Runnable, JmolNavigatorInterface

public final class Navigator extends JmolThread implements JmolNavigatorInterface
Navigator is a user input mechanism that utilizes the keypad to drive through the model. It is created by reflection only from org.jmol.viewer.TransformManager
  • Field Details

    • tm

      private TransformManager tm
    • nHits

      private int nHits
    • multiplier

      private int multiplier
    • isPathGuide

      private boolean isPathGuide
    • points

      private javajs.util.P3[] points
    • pointGuides

      private javajs.util.P3[] pointGuides
    • frameTimeMillis

      private int frameTimeMillis
    • floatSecondsTotal

      private float floatSecondsTotal
    • axis

      private javajs.util.V3 axis
    • degrees

      private float degrees
    • center

      private javajs.util.P3 center
    • depthPercent

      private float depthPercent
    • xTrans

      private float xTrans
    • yTrans

      private float yTrans
    • depthStart

      private float depthStart
    • depthDelta

      private float depthDelta
    • xTransStart

      private float xTransStart
    • xTransDelta

      private float xTransDelta
    • yTransStart

      private float yTransStart
    • yTransDelta

      private float yTransDelta
    • degreeStep

      private float degreeStep
    • centerStart

      private javajs.util.P3 centerStart
    • totalSteps

      private int totalSteps
    • aaStepCenter

      private javajs.util.V3 aaStepCenter
    • isNavTo

      private boolean isNavTo
    • iStep

      private int iStep
    • iList

      private int iList
    • isStep

      private boolean isStep
  • Constructor Details

    • Navigator

      public Navigator()
  • Method Details

    • set

      public void set(TransformManager tm, Viewer vwr)
      Specified by:
      set in interface JmolNavigatorInterface
    • run1

      protected void run1(int mode) throws InterruptedException
      Specified by:
      run1 in class JmolThread
      Throws:
      InterruptedException
    • nextList

      private void nextList(Object[] o, javajs.util.P3 ptTemp)
      Parameters:
      o - Object[] {int tok, Float seconds, ...}
      ptTemp -
    • setNavPercent

      private void setNavPercent(javajs.util.P3 pt1)
    • doNavStep

      private void doNavStep(int iStep)
    • setupNavTo

      private void setupNavTo()
    • setupNav

      private void setupNav(float seconds, javajs.util.P3[][] pathGuide, javajs.util.P3[] path, int indexStart, int indexEnd)
    • alignZX

      private void alignZX(javajs.util.P3 pt0, javajs.util.P3 pt1, javajs.util.P3 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 -
    • zoomByFactor

      public void zoomByFactor(float factor, int x, int y)
      Specified by:
      zoomByFactor in interface JmolNavigatorInterface
    • calcNavigationPoint

      public void calcNavigationPoint()
      Specified by:
      calcNavigationPoint in interface JmolNavigatorInterface
    • calcNavSlabAndDepthValues

      private void calcNavSlabAndDepthValues()
    • 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.
    • setNavigationOffsetRelative

      public void setNavigationOffsetRelative()
      Specified by:
      setNavigationOffsetRelative in interface JmolNavigatorInterface
    • setNavigationDepthPercent

      public void setNavigationDepthPercent(float percent)
      Specified by:
      setNavigationDepthPercent in interface JmolNavigatorInterface
    • calcNavigationDepthPercent

      private void calcNavigationDepthPercent()
    • getNavigationState

      public String getNavigationState()
      Specified by:
      getNavigationState in interface JmolNavigatorInterface
    • getNavigationSlabOffsetPercent

      private float getNavigationSlabOffsetPercent()
    • oops

      protected void oops(Exception e)
      Overrides:
      oops in class JmolThread