Class Navigator

  • All Implemented Interfaces:
    java.lang.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 Detail

      • 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
      • navigationList

        private javajs.util.Lst<java.lang.Object[]> navigationList
      • iList

        private int iList
      • isStep

        private boolean isStep
    • Constructor Detail

      • Navigator

        public Navigator()
    • Method Detail

      • nextList

        private void nextList​(int i,
                              javajs.util.P3 ptTemp)
      • setNavPercent

        private void setNavPercent​(javajs.util.P3 pt1)
      • navigateTo

        public void navigateTo​(float seconds,
                               javajs.util.V3 axis,
                               float degrees,
                               javajs.util.P3 center,
                               float depthPercent,
                               float xTrans,
                               float yTrans)
        Specified by:
        navigateTo in interface JmolNavigatorInterface
      • navigate

        public void navigate​(float seconds,
                             javajs.util.P3[][] pathGuide,
                             javajs.util.P3[] path,
                             float[] theta,
                             int indexStart,
                             int indexEnd)
        Specified by:
        navigate in interface JmolNavigatorInterface
      • run1

        protected void run1​(int mode)
                     throws java.lang.InterruptedException
        Specified by:
        run1 in class JmolThread
        Throws:
        java.lang.InterruptedException
      • 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 -
      • 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.
      • calcNavigationDepthPercent

        private void calcNavigationDepthPercent()
      • getNavigationSlabOffsetPercent

        private float getNavigationSlabOffsetPercent()
      • oops

        protected void oops​(java.lang.Exception e)
        Overrides:
        oops in class JmolThread