Class FlyThroughRender
- java.lang.Object
-
- WildMagic.LibApplications.OpenGLApplication.Application
-
- WildMagic.LibApplications.OpenGLApplication.JavaApplication
-
- WildMagic.LibApplications.OpenGLApplication.JavaApplication3D
-
- gov.nih.mipav.view.renderer.WildMagic.GPURenderBase
-
- gov.nih.mipav.view.renderer.WildMagic.flythroughview.FlyThroughRender
-
- All Implemented Interfaces:
com.jogamp.opengl.GLEventListener
,SpaceNavigatorListener
,FlyThroughRenderInterface
,FlyPathBehavior_WM.Callback
,java.awt.event.KeyListener
,java.awt.event.MouseListener
,java.awt.event.MouseMotionListener
,java.awt.event.MouseWheelListener
,java.io.Serializable
,java.util.EventListener
public class FlyThroughRender extends GPURenderBase implements FlyThroughRenderInterface, FlyPathBehavior_WM.Callback, com.jogamp.opengl.GLEventListener, java.awt.event.MouseWheelListener
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
FlyThroughRender.MouseWheel
Mouse middle button wheel roller event handler.(package private) class
FlyThroughRender.RightMouse
RightMouse press event handler.(package private) class
FlyThroughRender.RightMouseDragged
Right mouse button press down and drag event handler.static class
FlyThroughRender.SetupOptions
-
Field Summary
Fields Modifier and Type Field Description static int
lookdown
static int
lookleft
static int
lookright
static int
lookup
private int[]
m_aiBranchIndexUnvisitedMax
This is the range of path samples for each branch that are unvisited.private int[]
m_aiBranchIndexUnvisitedMin
This is the range of path samples for each branch that are unvisited.private WildMagic.LibFoundation.Mathematics.ColorRGB[]
m_akColorBackup
Original surface color for undoing the pseudo-color curvature map.private int
m_iLastSelectedBranchIndex
Keep track of the last branch that was selected (at a branch point).private FlyPathAnnotateList_WM
m_kAnnotateList
Annotations along the fly path.private WildMagic.LibFoundation.Mathematics.Vector3f
m_kCenter
Center of Meshprivate JPanelVirtualEndoscopySetup_WM
m_kControlFrame
This is the control frame which may need to be updated as the view changes.private MjCorticalMesh_WM
m_kCortical
Calculating the mesh curvatures.private FlyPathBehavior_WM
m_kFlyPathBehavior
Fly path behavior.private FlyPathGraphCurve
m_kFlyPathGraphCurve
Fly path curve.private WildMagic.LibGraphics.Rendering.Light
m_kLight
Lighting in the scene.private SurfaceLightingEffect
m_kLightShader
Lighting effect.private ModelImage
m_kMaskImage
ModelImage used to generate the fly path.private ModelLUT
m_kMeanCurvaturesLUT
kMean curvature LUT.private WildMagic.LibFoundation.Mathematics.ColorRGB
m_kNormalColorPathUnvisited
Color for the parts of the path that have not yet been visited (Dark Green)private WildMagic.LibFoundation.Mathematics.ColorRGB
m_kNormalColorPathVisited
Color for the parts of the path that have been visited (Light Green)private FlyThroughRender.SetupOptions
m_kOptions
Setup options.protected VolumeTriPlanarInterface
m_kParent
Parent user-interface and display frame.private WildMagic.LibGraphics.SceneGraph.Node
m_kRotation
Mouse rotation.private WildMagic.LibFoundation.Mathematics.ColorRGB
m_kSelectColorPathUnvisited
Color for selecting previously-unvisited parts of the path at a branch (Dark Red)private WildMagic.LibFoundation.Mathematics.ColorRGB
m_kSelectColorPathVisited
Color for selecting previously-visited parts of the path at a branch (Red)private Skeleton3D
m_kSkeleton
3D Skeleton of the ModelImage.private WildMagic.LibGraphics.SceneGraph.TriMesh
m_kSurface
The surface to fly through.private ModelImage3DLayout
m_kVolumeLayout
3D Layout of the ModelImage.private boolean
pressed
If any of the mouse move button pressed.private static long
serialVersionUID
Use serialVersionUID for interoperability.-
Fields inherited from class gov.nih.mipav.view.renderer.WildMagic.GPURenderBase
dpiScale, hyperstack, hyperstackColormap, isSpaceNavCodeRunning, m_akLights, m_bDispose, m_bDoClip, m_bExtract, m_bFirstDrag, m_bInit, m_bModified, m_bMouseDrag, m_bPickPending, m_bShared, m_bSnapshot, m_bSurfaceMaskUpdate, m_bSurfaceUpdate, m_bTestFrameRate, m_bVisible, m_fMax, m_fX, m_fY, m_fZ, m_iCaptureFPS, m_iScreenCaptureCounter, m_iXPick, m_iYPick, m_kAnimator, m_kCuller, m_kDeleteList, m_kDisplayList, m_kPicker, m_kSceneToWorld, m_kTranslate, m_kVolumeImageA, m_kVolumeImageA_New, m_kVolumeImageA_Old, m_kVolumeImageB, m_kVolumeImageB_New, m_kVolumeImageB_Old, m_kWinLevel, m_kXRotate, m_kYRotate, m_kZRotate, m_spkCull, m_spkScene, nearPlane, updateBoundingCube
-
Fields inherited from class WildMagic.LibApplications.OpenGLApplication.JavaApplication3D
cameraParams, m_akWorldAxis, m_bCameraMoveable, m_bDArrowPressed, m_bEndPressed, m_bHomePressed, m_bLArrowPressed, m_bLInsertPressed, m_bObjectZoomed, m_bPgDnPressed, m_bPgUpPressed, m_bRArrowPressed, m_bRDeletePressed, m_bTrackBallDown, m_bUArrowPressed, m_bUseTrackBall, m_dAccumulatedTime, m_dFrameRate, m_dLastTime, m_fRotSpeed, m_fRotSpeedFactor, m_fTrnSpeed, m_fTrnSpeedFactor, m_fXDrag0, m_fXTrack0, m_fXTrack1, m_fYDrag0, m_fYTrack0, m_fYTrack1, m_fZoomSpeed, m_iAccumulatedFrameCount, m_iDoPitch, m_iDoRoll, m_iDoYaw, m_iFrameCount, m_iMaxTimer, m_iMouseButton, m_iTimer, m_kSaveRotate, m_mouseRotSpeed, m_spkCamera, m_spkMotionObject, pitchRotationAngle, rollRotationAngle, xCameraMove, xCameraTurn, yawRotationAngle, yCameraMove, yCameraTurn, zCameraMove
-
-
Constructor Summary
Constructors Constructor Description FlyThroughRender(com.jogamp.opengl.awt.GLCanvas kCanvas, VolumeTriPlanarInterface kParent, com.jogamp.opengl.util.Animator kAnimator, VolumeImage kVolumeImageA, VolumeImage kVolumeImageB, WildMagic.LibFoundation.Mathematics.Vector3f kTranslate)
Construct the FlyThroughRenderer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addSurface(WildMagic.LibGraphics.SceneGraph.TriMesh kSurface, WildMagic.LibFoundation.Mathematics.Vector3f kCenter)
Add the fly-through surface.void
autoRun()
Causes the FlyPathBehavior to fly down the current path from start to finish and back again.private void
createAnnotatePoint(WildMagic.LibFoundation.Mathematics.Vector3f kPosition)
Create a new Annotation point at the position specified.private WildMagic.LibGraphics.SceneGraph.Polyline
createBranchConnectGeometryScaled(int iBranch)
Get the geometry to be used for rendering the connection of the specified branch to its parent branch.private WildMagic.LibGraphics.SceneGraph.Polyline
createBranchPathGeometryScaled(int iBranch)
Get the geometry to be used for rendering the path of the specified branch.private void
CreateScene()
Called by the init() function.void
display(com.jogamp.opengl.GLAutoDrawable arg0)
void
doPseudoColor(boolean bOn)
Turn curvature-based color map on/off.java.lang.Object
getBranchState()
WildMagic.LibFoundation.Mathematics.Vector3f
getCameraDirection()
Return the camera direction vector.WildMagic.LibFoundation.Mathematics.Vector3f
getCameraUp()
Return the camera up vector.java.awt.Canvas
getCanvas()
int
getHeight()
WildMagic.LibFoundation.Mathematics.Vector3f
getPositionScaled(WildMagic.LibFoundation.Mathematics.Vector3f kPoint)
Scaled coordinates for the current position along the path for viewing.WildMagic.LibFoundation.Mathematics.Vector3f
getPositionUnScaled(WildMagic.LibFoundation.Mathematics.Vector3f kPoint)
Scaled coordinates for the current position along the path for viewing.int
getWidth()
void
init(com.jogamp.opengl.GLAutoDrawable arg0)
void
keyPressed(java.awt.event.KeyEvent e)
Part of the KeyListener interface.static FlyThroughRender
main(com.jogamp.opengl.awt.GLCanvas kCanvas, VolumeTriPlanarInterface kParent, VolumeImage kVolumeImageA, VolumeImage kVolumeImageB, WildMagic.LibFoundation.Mathematics.Vector3f kTranslate, boolean displayInSeparateFrame)
void
makeMove(java.lang.String cmd)
Passes move command from the JPanelFlythruMove to the FlyPathBehavior class.void
mouseDragged(java.awt.event.MouseEvent event)
void
mousePressed(java.awt.event.MouseEvent e)
void
mouseReleased(java.awt.event.MouseEvent e)
void
mouseWheelMoved(java.awt.event.MouseWheelEvent event)
Mouse wheel event invoked from the middle mouse button roller.protected void
Move()
Updates the camera and displayed objects for rendering.protected void
Pick()
Picking support for adding Annotation points to the scene.private void
Render()
Render the scene-graph.protected void
resetRenderBranchConnect()
Called any time a change has been made to a new branch so that the connection between the branch and its parent can be rendered.protected void
resetRenderBranchPath()
Called any time the position along the current curve changes and the color of the curve needs to change to show what has been visited.private ModelImage
resizeImage(ModelImage kInput)
void
setCurrentState(java.lang.Object _state)
Set the BranchState in the FlyPathBehavior.void
setupRender(ModelImage kImage, FlyThroughRender.SetupOptions kOptions)
Setup flythru renderer.void
setupRenderControl(JPanelVirtualEndoscopySetup_WM _control)
Set the JPanelVirtualEndoscopySetup user-interface.void
update()
Update the representation of the current viewpoint in the Volume Tri-Planar renderer.private void
updateCamera()
Update the camera location and view direction.void
updateLighting(WildMagic.LibGraphics.Rendering.Light[] akGLights)
Called from JPanelLight.void
viewChanged(FlyPathBehavior_WM behavior, int iEvent)
ViewChanged callback for flythrough renderers.-
Methods inherited from class gov.nih.mipav.view.renderer.WildMagic.GPURenderBase
AddNode, checkIfSpaceNavNeedsCalibration, dispose, dispose, drawText, fineMovement, GetCanvas, getCounter, getDisplayList, getImage, GetLights, getNearPlane, GetNode, getNormalizedXDim, getNormalizedYDim, getNormalizedZDim, getRotationCutoffValue, getRotationScaleFactor, GetSceneRotation, getSceneToWorldMatrix, getTranslate, getTranslationCutoffValue, getTranslationScaleFactor, getVolumeImage, getVolumeImageB, invertRX, invertRY, invertRZ, invertTX, invertTY, invertTZ, isUseMouseRotationCutoffs, isUseMouseTranslationCutoffs, isVisible, normalMovement, pauseAnimator, processSpaceNavEvent, processSpaceNavEvent, record, reInitialize, RemoveNode, RenderFrameRate, resetAxis, resetAxisX, resetAxisXInv, resetAxisY, reshape, saveAVIMovie, saveQuickTimeMovie, setCameraNearPlane, setDefaultLighting, setOrthographicProjection, setPerspectiveProjection, setRotationCutoffValue, setRotationScaleFactor, SetSceneRotation, setTranslationCutoffValue, setTranslationScaleFactor, setUseMouseRotationCutoffs, setUseMouseTranslationCutoffs, setVisible, startAnimator, updateImageFromRotation, UpdateSceneRotation, writeImage
-
Methods inherited from class WildMagic.LibApplications.OpenGLApplication.JavaApplication3D
DrawFrameRate, getCameraLocation, getCameraParameters, getObjectParameters, getObjectRotation, InitializeCameraMotion, InitializeCameraMotion, InitializeObjectMotion, keyReleased, keyTyped, LookDown, LookUp, MeasureTime, mouseClicked, mouseEntered, mouseExited, mouseMoved, MoveBackward, MoveCamera, MoveDown, MoveForward, MoveLeft, MoveObject, MoveRight, MoveUp, OnDisplay, OnInitialize, OnTerminate, ResetTime, RotateTrackBall, setCameraLocation, setCameraParameters, setObjectParameters, setObjectRotation, TurnLeft, TurnRight, UpdateCameraRotationSpeed, UpdateCameraTranslationSpeed, UpdateCameraZoomSpeed, UpdateFrameCount, UpdateMouseRotationSpeed
-
Methods inherited from class WildMagic.LibApplications.OpenGLApplication.JavaApplication
GetAspectRatio, GetHeight, GetRenderer, GetWidth, GetWindowTitle, GetXPosition, GetYPosition, OnIdle, OnMove, OnPrecreate, OnResize, SetRenderer
-
Methods inherited from class WildMagic.LibApplications.OpenGLApplication.Application
reloadShaders, TestStreaming
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface gov.nih.mipav.view.renderer.flythroughview.FlyThroughRenderInterface
getCounter, getImage, record, writeImage
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
Use serialVersionUID for interoperability.- See Also:
- Constant Field Values
-
m_kParent
protected VolumeTriPlanarInterface m_kParent
Parent user-interface and display frame.
-
m_kVolumeLayout
private ModelImage3DLayout m_kVolumeLayout
3D Layout of the ModelImage.
-
m_kSkeleton
private Skeleton3D m_kSkeleton
3D Skeleton of the ModelImage.
-
m_kFlyPathGraphCurve
private FlyPathGraphCurve m_kFlyPathGraphCurve
Fly path curve.
-
m_kFlyPathBehavior
private FlyPathBehavior_WM m_kFlyPathBehavior
Fly path behavior.
-
m_kAnnotateList
private FlyPathAnnotateList_WM m_kAnnotateList
Annotations along the fly path.
-
m_kMaskImage
private ModelImage m_kMaskImage
ModelImage used to generate the fly path.
-
m_iLastSelectedBranchIndex
private int m_iLastSelectedBranchIndex
Keep track of the last branch that was selected (at a branch point).
-
m_aiBranchIndexUnvisitedMax
private int[] m_aiBranchIndexUnvisitedMax
This is the range of path samples for each branch that are unvisited.
-
m_kNormalColorPathVisited
private WildMagic.LibFoundation.Mathematics.ColorRGB m_kNormalColorPathVisited
Color for the parts of the path that have been visited (Light Green)
-
m_kNormalColorPathUnvisited
private WildMagic.LibFoundation.Mathematics.ColorRGB m_kNormalColorPathUnvisited
Color for the parts of the path that have not yet been visited (Dark Green)
-
m_kSelectColorPathVisited
private WildMagic.LibFoundation.Mathematics.ColorRGB m_kSelectColorPathVisited
Color for selecting previously-visited parts of the path at a branch (Red)
-
m_kSelectColorPathUnvisited
private WildMagic.LibFoundation.Mathematics.ColorRGB m_kSelectColorPathUnvisited
Color for selecting previously-unvisited parts of the path at a branch (Dark Red)
-
m_aiBranchIndexUnvisitedMin
private int[] m_aiBranchIndexUnvisitedMin
This is the range of path samples for each branch that are unvisited.
-
m_kSurface
private WildMagic.LibGraphics.SceneGraph.TriMesh m_kSurface
The surface to fly through.
-
m_kLight
private WildMagic.LibGraphics.Rendering.Light m_kLight
Lighting in the scene.
-
m_kOptions
private FlyThroughRender.SetupOptions m_kOptions
Setup options.
-
m_kControlFrame
private JPanelVirtualEndoscopySetup_WM m_kControlFrame
This is the control frame which may need to be updated as the view changes.
-
m_kRotation
private WildMagic.LibGraphics.SceneGraph.Node m_kRotation
Mouse rotation.
-
m_kCortical
private MjCorticalMesh_WM m_kCortical
Calculating the mesh curvatures.
-
m_kCenter
private WildMagic.LibFoundation.Mathematics.Vector3f m_kCenter
Center of Mesh
-
m_kMeanCurvaturesLUT
private ModelLUT m_kMeanCurvaturesLUT
kMean curvature LUT. Pseudo color look up table.
-
m_kLightShader
private SurfaceLightingEffect m_kLightShader
Lighting effect.
-
m_akColorBackup
private WildMagic.LibFoundation.Mathematics.ColorRGB[] m_akColorBackup
Original surface color for undoing the pseudo-color curvature map.
-
pressed
private volatile boolean pressed
If any of the mouse move button pressed.
-
lookup
public static int lookup
-
lookdown
public static int lookdown
-
lookright
public static int lookright
-
lookleft
public static int lookleft
-
-
Constructor Detail
-
FlyThroughRender
public FlyThroughRender(com.jogamp.opengl.awt.GLCanvas kCanvas, VolumeTriPlanarInterface kParent, com.jogamp.opengl.util.Animator kAnimator, VolumeImage kVolumeImageA, VolumeImage kVolumeImageB, WildMagic.LibFoundation.Mathematics.Vector3f kTranslate)
Construct the FlyThroughRenderer.- Parameters:
kParent
- parent user-interface and frame.kAnimator
- animator used to display the canvas.kVolumeImageA
- volume data and textures for ModelImage A.kVolumeImageB
- volume data and textures for ModelImage B.
-
-
Method Detail
-
main
public static FlyThroughRender main(com.jogamp.opengl.awt.GLCanvas kCanvas, VolumeTriPlanarInterface kParent, VolumeImage kVolumeImageA, VolumeImage kVolumeImageB, WildMagic.LibFoundation.Mathematics.Vector3f kTranslate, boolean displayInSeparateFrame)
-
addSurface
public void addSurface(WildMagic.LibGraphics.SceneGraph.TriMesh kSurface, WildMagic.LibFoundation.Mathematics.Vector3f kCenter)
Add the fly-through surface.- Parameters:
kSurface
- the TriMesh surface to fly through.
-
autoRun
public void autoRun()
Description copied from interface:FlyThroughRenderInterface
Causes the FlyPathBehavior to fly down the current path from start to finish and back again.- Specified by:
autoRun
in interfaceFlyThroughRenderInterface
-
display
public void display(com.jogamp.opengl.GLAutoDrawable arg0)
- Specified by:
display
in interfacecom.jogamp.opengl.GLEventListener
-
doPseudoColor
public void doPseudoColor(boolean bOn)
Turn curvature-based color map on/off.- Parameters:
bOn
- turns curvature-based color map on when true and off when false.
-
getBranchState
public java.lang.Object getBranchState()
- Specified by:
getBranchState
in interfaceFlyThroughRenderInterface
- Returns:
- the current BranchState from the FlyPatheBehavior class.
-
getCameraDirection
public WildMagic.LibFoundation.Mathematics.Vector3f getCameraDirection()
Return the camera direction vector.- Returns:
- camera direction vector.
-
getCameraUp
public WildMagic.LibFoundation.Mathematics.Vector3f getCameraUp()
Return the camera up vector.- Returns:
- camera up vector.
-
getCanvas
public java.awt.Canvas getCanvas()
- Specified by:
getCanvas
in interfaceFlyThroughRenderInterface
- Returns:
- the Canvas from the Fly-through renderer.
-
getHeight
public int getHeight()
- Specified by:
getHeight
in interfaceFlyThroughRenderInterface
- Returns:
- the frame height.
-
getPositionScaled
public WildMagic.LibFoundation.Mathematics.Vector3f getPositionScaled(WildMagic.LibFoundation.Mathematics.Vector3f kPoint)
Scaled coordinates for the current position along the path for viewing.- Parameters:
Point
- in normalized path coordinates.- Returns:
- Point3f A new instance created which contains the path position coordinates, scaled to match the TriMesh in JPanelSurface.
-
getPositionUnScaled
public WildMagic.LibFoundation.Mathematics.Vector3f getPositionUnScaled(WildMagic.LibFoundation.Mathematics.Vector3f kPoint)
Scaled coordinates for the current position along the path for viewing.- Parameters:
The
- path position coordinates, scaled to match the TriMesh.- Returns:
- Point in normalized path coordinates.
-
getWidth
public int getWidth()
- Specified by:
getWidth
in interfaceFlyThroughRenderInterface
- Returns:
- the frame width.
-
init
public void init(com.jogamp.opengl.GLAutoDrawable arg0)
- Specified by:
init
in interfacecom.jogamp.opengl.GLEventListener
-
keyPressed
public void keyPressed(java.awt.event.KeyEvent e)
Description copied from class:GPURenderBase
Part of the KeyListener interface.- Specified by:
keyPressed
in interfacejava.awt.event.KeyListener
- Overrides:
keyPressed
in classGPURenderBase
- Parameters:
e
- the key event.
-
makeMove
public void makeMove(java.lang.String cmd)
Description copied from interface:FlyThroughRenderInterface
Passes move command from the JPanelFlythruMove to the FlyPathBehavior class.- Specified by:
makeMove
in interfaceFlyThroughRenderInterface
- Parameters:
cmd
- move command.
-
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent event)
- Specified by:
mouseDragged
in interfacejava.awt.event.MouseMotionListener
- Overrides:
mouseDragged
in classWildMagic.LibApplications.OpenGLApplication.JavaApplication3D
-
mousePressed
public void mousePressed(java.awt.event.MouseEvent e)
- Specified by:
mousePressed
in interfacejava.awt.event.MouseListener
- Overrides:
mousePressed
in classGPURenderBase
-
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent e)
- Specified by:
mouseReleased
in interfacejava.awt.event.MouseListener
- Overrides:
mouseReleased
in classWildMagic.LibApplications.OpenGLApplication.JavaApplication3D
-
mouseWheelMoved
public void mouseWheelMoved(java.awt.event.MouseWheelEvent event)
Mouse wheel event invoked from the middle mouse button roller. Rolling forward to track the fly-thru path in forward direction. Rolling backward to track the fly-thru path in backward direction.- Specified by:
mouseWheelMoved
in interfacejava.awt.event.MouseWheelListener
- Overrides:
mouseWheelMoved
in classWildMagic.LibApplications.OpenGLApplication.JavaApplication3D
- Parameters:
event
- mouse middle mouse roller event.
-
setCurrentState
public void setCurrentState(java.lang.Object _state)
Description copied from interface:FlyThroughRenderInterface
Set the BranchState in the FlyPathBehavior.- Specified by:
setCurrentState
in interfaceFlyThroughRenderInterface
-
setupRender
public void setupRender(ModelImage kImage, FlyThroughRender.SetupOptions kOptions)
Setup flythru renderer.- Parameters:
_kImage
- original model image reference.kOptions
- setup options reference.
-
setupRenderControl
public void setupRenderControl(JPanelVirtualEndoscopySetup_WM _control)
Set the JPanelVirtualEndoscopySetup user-interface.- Parameters:
_control
- the JPanelVirtualEndoscopySetup user-interface.
-
update
public void update()
Update the representation of the current viewpoint in the Volume Tri-Planar renderer.
-
updateLighting
public void updateLighting(WildMagic.LibGraphics.Rendering.Light[] akGLights)
Description copied from class:GPURenderBase
Called from JPanelLight. Updates the lighting parameters.- Overrides:
updateLighting
in classGPURenderBase
- Parameters:
akGLights
- the set of GeneralLight objects.
-
viewChanged
public void viewChanged(FlyPathBehavior_WM behavior, int iEvent)
Description copied from interface:FlyPathBehavior_WM.Callback
ViewChanged callback for flythrough renderers.- Specified by:
viewChanged
in interfaceFlyPathBehavior_WM.Callback
- Parameters:
behavior
- reference to this MjFlyPathBehavior in which the view changed.iEvent
- Bitmask identifies the event(s) which caused the view to change. Bitmask created from OR of EVENT_* defintions.
-
createAnnotatePoint
private void createAnnotatePoint(WildMagic.LibFoundation.Mathematics.Vector3f kPosition)
Create a new Annotation point at the position specified.- Parameters:
kPosition
- position of new annotation point.
-
createBranchConnectGeometryScaled
private WildMagic.LibGraphics.SceneGraph.Polyline createBranchConnectGeometryScaled(int iBranch)
Get the geometry to be used for rendering the connection of the specified branch to its parent branch.- Parameters:
iBranch
- Index which identifies the branch.- Returns:
- Polyline instance that can be attached to a scene-graph Node for rendering
-
createBranchPathGeometryScaled
private WildMagic.LibGraphics.SceneGraph.Polyline createBranchPathGeometryScaled(int iBranch)
Get the geometry to be used for rendering the path of the specified branch.- Parameters:
iBranch
- Index which identifies the branch.- Returns:
- Polyline instance that can be attached to a scene-graph Node for rendering
The coordinates are scaled to match the TriMesh in JPanelSurface.
-
CreateScene
private void CreateScene()
Called by the init() function. Creates and initialized the scene-graph.- Parameters:
arg0
- the GLCanvas
-
Render
private void Render()
Render the scene-graph.
-
resizeImage
private ModelImage resizeImage(ModelImage kInput)
-
updateCamera
private void updateCamera()
Update the camera location and view direction. Called from mouse dragged. Implements "inside looking out" object rotation.
-
Move
protected void Move()
Description copied from class:GPURenderBase
Updates the camera and displayed objects for rendering.- Overrides:
Move
in classGPURenderBase
-
Pick
protected void Pick()
Picking support for adding Annotation points to the scene.
-
resetRenderBranchConnect
protected void resetRenderBranchConnect()
Called any time a change has been made to a new branch so that the connection between the branch and its parent can be rendered.
-
resetRenderBranchPath
protected void resetRenderBranchPath()
Called any time the position along the current curve changes and the color of the curve needs to change to show what has been visited.
-
-