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) classFlyThroughRender.MouseWheelMouse middle button wheel roller event handler.(package private) classFlyThroughRender.RightMouseRightMouse press event handler.(package private) classFlyThroughRender.RightMouseDraggedRight mouse button press down and drag event handler.static classFlyThroughRender.SetupOptions
-
Field Summary
Fields Modifier and Type Field Description static intlookdownstatic intlookleftstatic intlookrightstatic intlookupprivate int[]m_aiBranchIndexUnvisitedMaxThis is the range of path samples for each branch that are unvisited.private int[]m_aiBranchIndexUnvisitedMinThis is the range of path samples for each branch that are unvisited.private WildMagic.LibFoundation.Mathematics.ColorRGB[]m_akColorBackupOriginal surface color for undoing the pseudo-color curvature map.private intm_iLastSelectedBranchIndexKeep track of the last branch that was selected (at a branch point).private FlyPathAnnotateList_WMm_kAnnotateListAnnotations along the fly path.private WildMagic.LibFoundation.Mathematics.Vector3fm_kCenterCenter of Meshprivate JPanelVirtualEndoscopySetup_WMm_kControlFrameThis is the control frame which may need to be updated as the view changes.private MjCorticalMesh_WMm_kCorticalCalculating the mesh curvatures.private FlyPathBehavior_WMm_kFlyPathBehaviorFly path behavior.private FlyPathGraphCurvem_kFlyPathGraphCurveFly path curve.private WildMagic.LibGraphics.Rendering.Lightm_kLightLighting in the scene.private SurfaceLightingEffectm_kLightShaderLighting effect.private ModelImagem_kMaskImageModelImage used to generate the fly path.private ModelLUTm_kMeanCurvaturesLUTkMean curvature LUT.private WildMagic.LibFoundation.Mathematics.ColorRGBm_kNormalColorPathUnvisitedColor for the parts of the path that have not yet been visited (Dark Green)private WildMagic.LibFoundation.Mathematics.ColorRGBm_kNormalColorPathVisitedColor for the parts of the path that have been visited (Light Green)private FlyThroughRender.SetupOptionsm_kOptionsSetup options.protected VolumeTriPlanarInterfacem_kParentParent user-interface and display frame.private WildMagic.LibGraphics.SceneGraph.Nodem_kRotationMouse rotation.private WildMagic.LibFoundation.Mathematics.ColorRGBm_kSelectColorPathUnvisitedColor for selecting previously-unvisited parts of the path at a branch (Dark Red)private WildMagic.LibFoundation.Mathematics.ColorRGBm_kSelectColorPathVisitedColor for selecting previously-visited parts of the path at a branch (Red)private Skeleton3Dm_kSkeleton3D Skeleton of the ModelImage.private WildMagic.LibGraphics.SceneGraph.TriMeshm_kSurfaceThe surface to fly through.private ModelImage3DLayoutm_kVolumeLayout3D Layout of the ModelImage.private booleanpressedIf any of the mouse move button pressed.private static longserialVersionUIDUse 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 voidaddSurface(WildMagic.LibGraphics.SceneGraph.TriMesh kSurface, WildMagic.LibFoundation.Mathematics.Vector3f kCenter)Add the fly-through surface.voidautoRun()Causes the FlyPathBehavior to fly down the current path from start to finish and back again.private voidcreateAnnotatePoint(WildMagic.LibFoundation.Mathematics.Vector3f kPosition)Create a new Annotation point at the position specified.private WildMagic.LibGraphics.SceneGraph.PolylinecreateBranchConnectGeometryScaled(int iBranch)Get the geometry to be used for rendering the connection of the specified branch to its parent branch.private WildMagic.LibGraphics.SceneGraph.PolylinecreateBranchPathGeometryScaled(int iBranch)Get the geometry to be used for rendering the path of the specified branch.private voidCreateScene()Called by the init() function.voiddisplay(com.jogamp.opengl.GLAutoDrawable arg0)voiddoPseudoColor(boolean bOn)Turn curvature-based color map on/off.java.lang.ObjectgetBranchState()WildMagic.LibFoundation.Mathematics.Vector3fgetCameraDirection()Return the camera direction vector.WildMagic.LibFoundation.Mathematics.Vector3fgetCameraUp()Return the camera up vector.java.awt.CanvasgetCanvas()intgetHeight()WildMagic.LibFoundation.Mathematics.Vector3fgetPositionScaled(WildMagic.LibFoundation.Mathematics.Vector3f kPoint)Scaled coordinates for the current position along the path for viewing.WildMagic.LibFoundation.Mathematics.Vector3fgetPositionUnScaled(WildMagic.LibFoundation.Mathematics.Vector3f kPoint)Scaled coordinates for the current position along the path for viewing.intgetWidth()voidinit(com.jogamp.opengl.GLAutoDrawable arg0)voidkeyPressed(java.awt.event.KeyEvent e)Part of the KeyListener interface.static FlyThroughRendermain(com.jogamp.opengl.awt.GLCanvas kCanvas, VolumeTriPlanarInterface kParent, VolumeImage kVolumeImageA, VolumeImage kVolumeImageB, WildMagic.LibFoundation.Mathematics.Vector3f kTranslate, boolean displayInSeparateFrame)voidmakeMove(java.lang.String cmd)Passes move command from the JPanelFlythruMove to the FlyPathBehavior class.voidmouseDragged(java.awt.event.MouseEvent event)voidmousePressed(java.awt.event.MouseEvent e)voidmouseReleased(java.awt.event.MouseEvent e)voidmouseWheelMoved(java.awt.event.MouseWheelEvent event)Mouse wheel event invoked from the middle mouse button roller.protected voidMove()Updates the camera and displayed objects for rendering.protected voidPick()Picking support for adding Annotation points to the scene.private voidRender()Render the scene-graph.protected voidresetRenderBranchConnect()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 voidresetRenderBranchPath()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 ModelImageresizeImage(ModelImage kInput)voidsetCurrentState(java.lang.Object _state)Set the BranchState in the FlyPathBehavior.voidsetupRender(ModelImage kImage, FlyThroughRender.SetupOptions kOptions)Setup flythru renderer.voidsetupRenderControl(JPanelVirtualEndoscopySetup_WM _control)Set the JPanelVirtualEndoscopySetup user-interface.voidupdate()Update the representation of the current viewpoint in the Volume Tri-Planar renderer.private voidupdateCamera()Update the camera location and view direction.voidupdateLighting(WildMagic.LibGraphics.Rendering.Light[] akGLights)Called from JPanelLight.voidviewChanged(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:FlyThroughRenderInterfaceCauses the FlyPathBehavior to fly down the current path from start to finish and back again.- Specified by:
autoRunin interfaceFlyThroughRenderInterface
-
display
public void display(com.jogamp.opengl.GLAutoDrawable arg0)
- Specified by:
displayin 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:
getBranchStatein 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:
getCanvasin interfaceFlyThroughRenderInterface- Returns:
- the Canvas from the Fly-through renderer.
-
getHeight
public int getHeight()
- Specified by:
getHeightin 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:
getWidthin interfaceFlyThroughRenderInterface- Returns:
- the frame width.
-
init
public void init(com.jogamp.opengl.GLAutoDrawable arg0)
- Specified by:
initin interfacecom.jogamp.opengl.GLEventListener
-
keyPressed
public void keyPressed(java.awt.event.KeyEvent e)
Description copied from class:GPURenderBasePart of the KeyListener interface.- Specified by:
keyPressedin interfacejava.awt.event.KeyListener- Overrides:
keyPressedin classGPURenderBase- Parameters:
e- the key event.
-
makeMove
public void makeMove(java.lang.String cmd)
Description copied from interface:FlyThroughRenderInterfacePasses move command from the JPanelFlythruMove to the FlyPathBehavior class.- Specified by:
makeMovein interfaceFlyThroughRenderInterface- Parameters:
cmd- move command.
-
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent event)
- Specified by:
mouseDraggedin interfacejava.awt.event.MouseMotionListener- Overrides:
mouseDraggedin classWildMagic.LibApplications.OpenGLApplication.JavaApplication3D
-
mousePressed
public void mousePressed(java.awt.event.MouseEvent e)
- Specified by:
mousePressedin interfacejava.awt.event.MouseListener- Overrides:
mousePressedin classGPURenderBase
-
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent e)
- Specified by:
mouseReleasedin interfacejava.awt.event.MouseListener- Overrides:
mouseReleasedin 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:
mouseWheelMovedin interfacejava.awt.event.MouseWheelListener- Overrides:
mouseWheelMovedin classWildMagic.LibApplications.OpenGLApplication.JavaApplication3D- Parameters:
event- mouse middle mouse roller event.
-
setCurrentState
public void setCurrentState(java.lang.Object _state)
Description copied from interface:FlyThroughRenderInterfaceSet the BranchState in the FlyPathBehavior.- Specified by:
setCurrentStatein 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:GPURenderBaseCalled from JPanelLight. Updates the lighting parameters.- Overrides:
updateLightingin classGPURenderBase- Parameters:
akGLights- the set of GeneralLight objects.
-
viewChanged
public void viewChanged(FlyPathBehavior_WM behavior, int iEvent)
Description copied from interface:FlyPathBehavior_WM.CallbackViewChanged callback for flythrough renderers.- Specified by:
viewChangedin 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:GPURenderBaseUpdates the camera and displayed objects for rendering.- Overrides:
Movein 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.
-
-