Class FlyPathBehavior_WM.BranchState

java.lang.Object
gov.nih.mipav.view.renderer.WildMagic.flythroughview.FlyPathBehavior_WM.BranchState
All Implemented Interfaces:
Cloneable
Enclosing class:
FlyPathBehavior_WM

private class FlyPathBehavior_WM.BranchState extends Object implements Cloneable
Branch information.
  • Field Details

    • m_afBranchPoint

      public float[] m_afBranchPoint
      List of branch points (normalized path distances where one or more branches starts).
    • m_bMoveForward

      public boolean m_bMoveForward
      Current direction. True if forward, false if reverse.
    • m_fNormalizedPathDist

      public float m_fNormalizedPathDist
      Current position along the path.
    • m_fParentBranchPoint

      public float m_fParentBranchPoint
      Normalized distance (in range [0,1]) along parent branch where the specified branch starts.
    • m_iBranchIndex

      public int m_iBranchIndex
      Identifies the current curve in the path graph.
    • m_iParentBranchIndex

      public int m_iParentBranchIndex
      Information about the parent branch, if one exists.
    • m_kBranchCurve

      public WildMagic.LibFoundation.Curves.Curve3f m_kBranchCurve
      Branch curve
    • m_fDistUnvisitedMax

      protected float m_fDistUnvisitedMax
      Range of normalized path distances that have not been visited.
    • m_fDistUnvisitedMin

      protected float m_fDistUnvisitedMin
      Range of normalized path distances that have not been visited.
  • Constructor Details

    • BranchState

      public BranchState(int iBranchIndex, FlyPathGraphCurve kFlyPathGraph)
      Constructor.
      Parameters:
      iBranchIndex - int Index which identifies the branch.
      kFlyPathGraph - FlyPathGraphCurve Data structure which contains all of the information about each branch and its connections.
  • Method Details

    • createCopy

      public FlyPathBehavior_WM.BranchState createCopy()
      Create a copy of this instance.
      Returns:
      BranchState New instance which is a copy of this instance.
    • createReverseCopy

      public FlyPathBehavior_WM.BranchState createReverseCopy()
      Create a copy of this instance which has the same information except that the state of the moving forward is inverted.
      Returns:
      BranchState New instance which is a copy of this instance except that the moving forward flag is inverted.
    • getBranchPointSegment

      public int getBranchPointSegment(float fNormalizedPathDist)
      Return an index which identifies segment the specified normalized path distance belongs.
      Parameters:
      fNormalizedPathDist - float Normalized path distance in the range [0,1] along the branch path.
      Returns:
      int An index of zero is returned if the distance is before the first branch point or if there are no branch points. An index of one is returned if the distance is greater than or equal to the first branch point but less than or equal to second branch point.
    • getForwardNormalizedPosition

      public WildMagic.LibFoundation.Mathematics.Vector3f getForwardNormalizedPosition(float fDist)
      Return the position of the curve of the point further down the curve the specified distance in the current heading.
      Parameters:
      fDist - float Distance further down the branch curve in the current heading. This value can be negative for a point in the reverse heading.
      Returns:
      Point3f Coordinates of the 3D point further down along the curve.
    • getForwardNormalizedTime

      public float getForwardNormalizedTime(float fForwardDist)
      Return the normalized path distance of a point further down the branch curve in the current heading.
      Parameters:
      fForwardDist - float Distance further down the branch curve in the current heading. This value can be negative for a point in the reverse heading.
      Returns:
      float Normalized path distance in the [0,1] range for the requested point.
    • start

      public void start()
      Reset parameters to start at the beginning of the path moving in the forward direction.
    • updateDistUnvisited

      public void updateDistUnvisited(float fNewNormalizedPathDistance)
      Update the range of normalized path distances that have not been visited. Call this method before changing the current normalized path distance!
      Parameters:
      fNewNormalizedPathDistance - float Normalized path distance about to be set for this branch.
    • clone

      protected Object clone()
      Clone the current branch state. Used by the mouse recording process.
      Overrides:
      clone in class Object
      Returns:
      Object
      Throws:
      InternalError - DOCUMENT ME!