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
Branch information.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfloat[]List of branch points (normalized path distances where one or more branches starts).booleanCurrent direction.protected floatRange of normalized path distances that have not been visited.protected floatRange of normalized path distances that have not been visited.floatCurrent position along the path.floatNormalized distance (in range [0,1]) along parent branch where the specified branch starts.intIdentifies the current curve in the path graph.intInformation about the parent branch, if one exists.WildMagic.LibFoundation.Curves.Curve3fBranch curve -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Objectclone()Clone the current branch state.Create a copy of this instance.Create a copy of this instance which has the same information except that the state of the moving forward is inverted.intgetBranchPointSegment(float fNormalizedPathDist) Return an index which identifies segment the specified normalized path distance belongs.WildMagic.LibFoundation.Mathematics.Vector3fgetForwardNormalizedPosition(float fDist) Return the position of the curve of the point further down the curve the specified distance in the current heading.floatgetForwardNormalizedTime(float fForwardDist) Return the normalized path distance of a point further down the branch curve in the current heading.voidstart()Reset parameters to start at the beginning of the path moving in the forward direction.voidupdateDistUnvisited(float fNewNormalizedPathDistance) Update the range of normalized path distances that have not been visited.
-
Field Details
-
m_afBranchPoint
public float[] m_afBranchPointList of branch points (normalized path distances where one or more branches starts). -
m_bMoveForward
public boolean m_bMoveForwardCurrent direction. True if forward, false if reverse. -
m_fNormalizedPathDist
public float m_fNormalizedPathDistCurrent position along the path. -
m_fParentBranchPoint
public float m_fParentBranchPointNormalized distance (in range [0,1]) along parent branch where the specified branch starts. -
m_iBranchIndex
public int m_iBranchIndexIdentifies the current curve in the path graph. -
m_iParentBranchIndex
public int m_iParentBranchIndexInformation about the parent branch, if one exists. -
m_kBranchCurve
public WildMagic.LibFoundation.Curves.Curve3f m_kBranchCurveBranch curve -
m_fDistUnvisitedMax
protected float m_fDistUnvisitedMaxRange of normalized path distances that have not been visited. -
m_fDistUnvisitedMin
protected float m_fDistUnvisitedMinRange of normalized path distances that have not been visited.
-
-
Constructor Details
-
BranchState
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
Create a copy of this instance.- Returns:
- BranchState New instance which is a copy of this instance.
-
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
Clone the current branch state. Used by the mouse recording process.- Overrides:
clonein classObject- Returns:
- Object
- Throws:
InternalError- DOCUMENT ME!
-