@ThreadSafe
public class Display
extends vona.ui.JOGLDisplay
MSim JOGLDisplay.
MSim rendering tasks include projecting geometry bounds, frustum culling, picking, buffer clearing, drawing, and buffer swapping.
This class is designed to be thread safe. The lock acquisition order for
deadlock avoidance extends that of JOGLDisplay
: synchronize on
Controller.LOCK
after Display3D.projectionLock
but before Display3D.rxsInteractor
, and synchronize on Display3D.rxsInteractor
before UI.manipulationDriver
, UI.manipulationInteractor
, and UI.widgetInteractor
, in that order.
Copyright (C) 2008 Marsette A. Vona, III
Modifier and Type | Field and Description |
---|---|
protected boolean[] |
classCurrentlyIndividuallyPickable
Cache of
EntityClass settings during a render. |
protected boolean[] |
classCurrentlyMasked
Cache of
EntityClass settings during a render. |
protected boolean[] |
classCurrentlyPickable
Cache of
EntityClass settings during a render. |
protected boolean[] |
classCurrentlyVisible
Cache of
EntityClass settings during a render. |
boolean |
clearPickCycleOnNav
enable for indicated option, see
UI |
boolean |
clearPickOnNav
enable for indicated option, see
UI |
private static java.lang.String |
cvsid |
static boolean |
DEF_FRAME_SAVE_WITH_CURSOR
whether to include cursor in frame saves by default
|
static float |
DEF_MASK_ALPHA
default
Display3D.maskAlpha |
static double |
DEF_VIEW_SCALE
Initial world-to-view scale.
|
boolean |
highlightSelection
enable for indicated option, see
UI |
static int |
INITIAL_HEIGHT
initial canvas dim
|
static int |
INITIAL_WIDTH
initial canvas dim
|
boolean |
maskPickCompliment
enable for indicated option, see
UI |
boolean |
maskPickCycleCompliment
enable for indicated option, see
UI |
boolean |
maskPickOccluding
enable for indicated option, see
UI |
boolean |
maskSelectionCompliment
enable for indicated option, see
UI |
static int |
MIN_ACCUM_ALPHA_BITS
minimum canvas config
|
static int |
MIN_ACCUM_BLUE_BITS
minimum canvas config
|
static int |
MIN_ACCUM_GREEN_BITS
minimum canvas config
|
static int |
MIN_ACCUM_RED_BITS
minimum canvas config
|
static int |
MIN_BLUE_BITS
minimum canvas config
|
static int |
MIN_DEPTH_BITS
minimum canvas config
|
static int |
MIN_GREEN_BITS
minimum canvas config
|
static int |
MIN_NUM_SAMPLES
minimum canvas config
|
static int |
MIN_RED_BITS
minimum canvas config
|
static int |
MIN_STENCIL_BITS
minimum canvas config
|
protected boolean |
pickingThisFrame
Whether pick computations are being performed during this render.
|
protected vona.time.TimeMetrics |
renderJointMetrics
application render metrics
|
protected vona.time.TimeMetrics |
renderLinkMetrics
application render metrics
|
boolean |
setRotationCenterToPickedNodeOrigin
enable for indicated option, see
UI |
static int |
TRACE_MSIM_EN
trace flags
|
UI |
ui
the application
UI |
protected vona.math.RX |
widgetFrameRX
Temp storage for widget frame transform.
|
static float |
Z_CLIP
initial symmetric z clip distance in view frame
|
accumAlphaBits, accumBlueBits, accumBufferAvailable, accumBufferClearEnabled, accumBufferGood, accumGreenBits, accumRedBits, allJOGLExtendedRenderMetrics, alphaBits, ambientLightIntensity, ambientLightIntensityChangePending, appearanceState, appliedFirstAppearance, applyAppearanceMetrics, arrayCount, backgroundColor, backgroundColorChangePending, blendEnabled, cC3f, cmtMatrix, colorBuf, coloringAttrs, colorMaterialEnabled, consedConfinedStateGL, CURRENT, currentColorMaterial, currentModelViewRX, currentModelViewScale, currentRenderLatch, DEF_MIN_ACCUM_ALPHA_BITS, DEF_MIN_ACCUM_BLUE_BITS, DEF_MIN_ACCUM_GREEN_BITS, DEF_MIN_ACCUM_RED_BITS, DEFAULT, depthTestEnabled, differentThreadsWarningIssued, directionalLightDirection, directionalLightDirectionChangePending, directionalLightIntensity, directionalLightIntensityChangePending, DISABLE_ACCUM_BUFFER_FACTOR, DISABLE_ACCUM_BUFFER_THRESHOLD, doPostFinish, doPreFinish, drawArraysMetrics, drawDisableColorWrite, drawDisableDepthTest, drawDisableDepthWrite, drawElementsMetrics, drawGeometryAccessorMetrics, drawGeometryArrayMetrics, drawGeometryMetrics, drawGeometryMultiTextureWarningIssued, drawGeometryVertexAttrsWarningIssued, drawGeometryWarningsIssued, drawJOGLGeometryMetrics, drawUnoptimizedMetrics, finishLatch, finishLock, finishMetrics, finishPending, finishWarningIssued, forceDisableAccumBuffer, FRAME_SAVE_FILE_EXT, FRAME_SAVE_INDEX_FORMAT, frameDroppingEnabled, geometryMutators, gl, glCanvas, glContext, glDrawingEnabled, glEventListener, glRendererString, glVendorString, glVersionString, ignoreNullAppearance, INITIAL_ARRAY_COUNT_CAPACITY, INITIAL_BUF_CAPACITY, isOpenGLThreadWarningIssued, j3d14Available, jogl2Available, joglRenderDepthOnlyMetrics, joglRenderTransparentMetrics, lightingEnabled, lineAttrs, materialAttrs, nC3f, normalBuf, numDroppedFrames, numJOGLGeometries, numMaskedGeometriesWas, numOptimizedGeometries, numVisiblePrims, pointAttrs, pointLineAAWarningIssued, polygonAttrs, primCountingEnabled, releaseRenderCallingThreadBeforeSwap, renderCallMetrics, renderImplMetrics, renderingAttrs, renderLatch, renderOngoing, renderThread, renderWaitMetrics, requestDelayMetrics, requestRepaintMetrics, screenDoorWarningIssued, shaderWarningIssued, singleThreadedWarningIssued, tempB4, tempC3f, tempC4f, tempI3, tempI4, tempI5, tempV3, tempV4, texCoordBuf, textureWarningIssued, TRACE_GL_EN, TRACE_JOGL_EN, TRACE_VERTICES_EN, traceFlagsPending, transparencyAttrs, tryEnableAccumBuffer, vertexAcessorWarningIssued, vertexBuf, WAIT_TIMEOUT_MS
accumPass1Metrics, accumPass2Metrics, ALL_COMPONENTS, allExtendedRenderMetrics, ambientAlpha, applyProjectionPending, applyWidgetRX, blueBits, canvas, canvasMouseLock, canvasMouseX, canvasMouseY, canvasSize, clearMetrics, cmtRX, cmtScale, COORD_ONLY, dbgAppearance, dbgSceneExtentsEnabled, dbgSceneExtentsRect, DEF_AMBIENT_LIGHT_INTENSITY, DEF_DIRECTIONAL_LIGHT_DIRECTION, DEF_DIRECTIONAL_LIGHT_INTENSITY, DEF_HIGHLIGHT_COLOR, DEF_HIGHLIGHT_FACTOR, DEF_PICK_THRESHOLD_PIXELS, DEF_Z_CLIP, defaultHighlightedAppearance, defaultHighlightedMaterial, defaultRotationCenter, defaultTransparentAppearance, defaultViewScale, defaultViewTXEM, depthBits, depthOnlyAppearance, depthRenderMaskedQueueEnabled, depthSortTransparentEnabled, drawingEnabled, dumpRenderMetricsPending, dumpSceneMetricsPending, emissiveColorWas, ENABLE_EXTENDED_RENDER_METRICS, ensureWidgetBoundingSpheresInViewEnabled, environmentLock, fitPending, frameSaveCount, frameSaveDirectory, frameSaveFPS, frameSaveLastTime, frameSaveLock, frameSaveMetrics, frameSaveNextIndex, frameSaveNextTime, frameSavePrefix, frameSaveStartTime, frameSaveWithCursor, frameTime, freezeSceneMetrics, freezeTransparentQueue, freezeWidgetBounds, frustumCullEnabled, greenBits, highlightColor, highlightFactor, highlightingEnabled, indexAccessors, lastFrameEndTime, LOCAL_TO_WORLD_STACK_INITIAL_CAPACITY, localToWorldRX, localToWorldStack, localToWorldStackSize, longFrameWarningThreshold, maskAlpha, maskedQueue, maskedQueueSize, maskingEnabled, MAX, MIN, navigationEnabled, newEmissiveColor, NUM_RECENT_METRICS, numDisabledWidgetGeometries, numFrames, numHighlightedGeometries, numMaskedGeometries, numPickableGeometries, numPickBoundsHits, numPickedGeometries, numPickGeometryHits, numSamples, numSceneGeometries, numSceneWidgets, numTransparentGeometries, numVisibleGeometries, passAlpha, pickBoundsOnly, pickExtentInLocal, pickExtentInView, pickGeometryMetrics, pickingEnabled, pickSegmentInLocalDirty, pickSegmentIntersectionsOnly, pickSegmentInViewPerpCanvas, pickSegmentLock, pickStartInLocal, pickStartInView, pickThresholdPixels, pickVisibleBoundsOnly, postRenderMetrics, premultipliedHighlightColor, premultiplyPassAlpha, preRenderMetrics, primitiveIterators, projectionLock, QUEUE_INITIAL_CAPACITY, recentCycleTime, recentCycleTimeWriteIndex, recentFrameTime, recentFrameTimeWriteIndex, redBits, renderDepthOnlyMetrics, renderDepthOnlyQueueMetrics, renderGeometryMetrics, renderHighlightedMetrics, renderImplPostSceneMetrics, renderImplPreSceneMetrics, renderInViewMetrics, renderMaskedGeometry, renderMetricsLock, renderSceneMetrics, renderTransparentMetrics, renderTransparentQueue1Metrics, renderTransparentQueue2Metrics, renderWidgetGeometryMetrics, renderWidgetMetrics, resetPickMetricsEveryRender, resetRenderMetricsPending, rxsInteractor, rxsInterpolator, sceneAABBInView, sceneMetricsLock, SCREEN_METERS_PER_PIXEL, SQRT3F, stencilBits, swapMetrics, TRACE_GENERIC_EN, TRACE_PICKING_EN, traceFlags, traceStream, transformWidgetBounds, transparentQueue, transparentQueueSize, unsetPickSegmentAfterRender, unsetPickSegmentOnProjectionChange, unsetPickSegmentOnWorldToViewChange, updateNavMetrics, updateProjectionMetrics, vertexAccessors, viewAABB, viewToCanvasScale, worldToViewRX, worldToViewRXTemp, worldToViewScale
Constructor and Description |
---|
Display(java.awt.GraphicsDevice gd,
UI ui)
make a display on gd
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
autoAddListenersToRXSInteractor()
Whether to call
RXSInteractor.addListeners(java.awt.Component) on Display3D.rxsInteractor in Display3D.addCanvasListeners() . |
protected void |
dumpRenderMetricsImpl(java.io.PrintStream s)
extends super to dump additional metrics
|
protected int |
getAllRenderTraceFlags()
Hook to get combination of all trace flags that apply to the render
algorithm.
|
protected java.lang.String |
getInfo(javax.media.j3d.Geometry geometry,
javax.media.j3d.Appearance appearance)
Get an identifying string for geometry and appearance for
use in tracing and dbg.
|
protected boolean |
isHighlighted(javax.media.j3d.Geometry geometry,
javax.media.j3d.Appearance appearance)
Hook that generic renderer uses to determine whether a
geometry/appearance combination should be categorized as
highlighted, if
Display3D.highlightingEnabled . |
protected boolean |
isMasked(javax.media.j3d.Geometry geometry,
javax.media.j3d.Appearance appearance)
Hook that generic renderer uses to determine whether a
geometry/appearance combination should be categorized as
masked, if
Display3D.maskingEnabled . |
protected boolean |
isPickable(javax.media.j3d.Geometry geometry,
javax.media.j3d.Appearance appearance)
Check if the given geometry should be considered pickable.
|
void |
navigateToView(LinkageNode node)
navigateToView(LinkageNode, String, boolean, boolean, boolean,
boolean) , canonical frame, always interpolates, does not set rotation
center or defaults. |
void |
navigateToView(LinkageNode node,
boolean setRotationCenter)
navigateToView(LinkageNode, String, boolean, boolean, boolean,
boolean) , canonical frame, always interpolates, does not set defaults. |
void |
navigateToView(LinkageNode node,
java.lang.String frame)
navigateToView(LinkageNode, String, boolean, boolean, boolean,
boolean) , always interpolates, does not set rotation center or
defaults. |
void |
navigateToView(LinkageNode node,
java.lang.String frame,
boolean setRotationCenter)
navigateToView(LinkageNode, String, boolean, boolean, boolean,
boolean) , always interpolates, does not set defaults. |
void |
navigateToView(LinkageNode node,
java.lang.String frame,
boolean setRotationCenter,
boolean setDefaultView,
boolean setDefaultRotationCenter)
navigateToView(LinkageNode, String, boolean, boolean, boolean,
boolean) , always interpolates. |
void |
navigateToView(LinkageNode node,
java.lang.String frame,
boolean setRotationCenter,
boolean setDefaultView,
boolean setDefaultRotationCenter,
boolean jump)
Covers
Display3D.navigateToView(RX, boolean, boolean, boolean, boolean)
using LinkageNode.getSubFrameCMT(String) . |
protected boolean |
picked(javax.media.j3d.Geometry geometry,
javax.media.j3d.Appearance appearance,
int prim,
float u)
Picking callback.
|
protected void |
preRender()
This impl does a
JOGLDisplay.doFinish(boolean) iff JOGLDisplay.doPreFinish , and
applies any pending bg or light changes. |
protected void |
projectionChanged()
Hook called when the projection transform has changed, default impl
does nothing.
|
protected void |
renderNodeWidget(vona.j3d.Widget w,
LinkageNode node,
java.lang.String frame)
render a widget under a known node in a given widget frame
|
protected void |
renderScene()
Hook called from generic
Display3D.render() to actually render the
scene. |
protected int |
renderTree(Joint j)
Render j and the sub-tree rooted at its child
Link , if
any, respecting EntityClass.visibility . |
protected int |
renderTree(Link l)
Render the sub-tree rooted at l, respecting
EntityClass.visibility . |
protected void |
rePicking()
Hook called from generic render when pick will be performed for a
render.
|
protected void |
resetRenderMetricsImpl()
extends super to reset additional metrics
|
void |
traceNextFrame(boolean tracePicking,
boolean traceGeneric,
boolean traceJOGL,
boolean traceGL,
boolean traceVertices,
boolean traceMSim)
Enable tracing for next frame with given options.
|
protected void |
worldToViewChanged()
Hook called when the world-to-view transform has changed (e.g.
|
accumPass, applyAppearance, applyAppearance, applyAppearance, applyAppearance, applyAppearance, applyAttrs, applyAttrs, applyAttrs, applyAttrs, applyAttrs, applyAttrs, applyAttrs, applyAttrs, applyAttrs, applyAttrs, applyAttrs, applyAttrs, applyAttrs, applyAttrs, applyAttrs, applyAttrs, applyAttrs, applyCMT, applyMaterialColor, applyProjection, blendedTransparencyMode, clearDrawingBuffer, compositeCursorOntoBGR, dbgPipelineEnabled, disableAccumBuffer, doFinish, draw, drawArrays, drawElements, drawEnable, drawGeometry, drawGeometry, drawGeometry, drawGeometry, drawGeometryAlpha, drawGetUnlitColor, drawUnoptimized, drawVertexColors, dumpCanvasProperties, dumpSceneMetricsImpl, enableAccumBufferIfAvailable, enableGLBlend, enableGLColorMaterial, enableGLDepthTest, enableGLDrawing, enableGLLighting, enablePrimCounting, ensureConfinedStateGL, fillBuffer, finish, finish, finish, getAccumAlphaBits, getAccumBlueBits, getAccumGreenBits, getAccumRedBits, getAlphaBits, getGLColorMask, getGLDepthMask, getGLMaterial, getGLMaterial, getGLMaterial, getGLStencilMask, getPickCullFace, getPropertyOverride, getPropertyOverride, getPropertyOverride, getVertexFormat, grabAndSaveFrame, hasAccumBuffer, hasVertexColors, issueDrawGeometryWarningMaybe, j3dToGLBlendFunc, j3dToGLLogicOp, j3dToGLPolygonOffsetMode, j3dToGLStencilOp, j3dToGLTestFunc, main, makeCanvas, makeCanvas, postRender, render, renderDepthOnly, renderTransparent, resetSceneMetrics, runGeometryMutators, scheduleGeometryMutator, setAmbientLightIntensity, setBackgroundColor, setDirectionalLightDirection, setDirectionalLightIntensity, setGLColorMaterial, setGLModelView, setTraceFlags, swapBuffers, traceNextFrame, tracePipelineEnabled, usingAccumBuffer, writeToTargaFile
addCanvasListeners, addToSceneMetrics, canvasToLocal, canvasToLocal, canvasToView, canvasToView, clearCMT, clearLocalToWorld, clearLocalToWorld, clearQueue, compareQueued, disableLongFrameWarningThreshold, doFit, draw, draw, draw, draw, draw, dump, dump, dumpAABB, dumpCanvasProperties, dumpCMT, dumpCMT, dumpHelp, dumpHelp, dumpHelp, dumpHelp, dumpInteractor, dumpInteractor, dumpLocalToWorld, dumpLocalToWorld, dumpPendingMetrics, dumpPickSegment, dumpPickSegment, dumpProjection, dumpProjection, dumpRenderMetrics, dumpRenderMetrics, dumpSceneMetrics, dumpSceneMetrics, dumpStats, dumpStats, dumpWorldToView, dumpWorldToView, enableDBGSceneExtents, enableDepthSortTransparent, enableDrawing, enableEnsureWidgetBoundingSpheresInView, enableFrustumCull, enableHighlighting, enableMasking, enableNavigation, enablePicking, enqueue, enqueueMaskedGeometry, enqueueTransparentGeometry, ensureDBGAppearance, fitView, getAmbientAlpha, getAvgRecentFPS, getBlueBits, getCanvas, getCanvasMouseLocation, getCanvasMouseLocation, getDefaultRotationCenter, getDefaultViewScale, getDefaultViewTXEM, getDepthBits, getGreenBits, getHighlightColor, getHighlightColor, getHighlightFactor, getIndexAccessorFor, getLocalTranslationRXToPixel, getLocalTranslationRXToPixel, getLocalTranslationRXToPixel, getLocalTranslationRXToPixel, getMaskAlpha, getNumFrames, getNumFramesSaved, getNumSamples, getPickThreshold, getPickThresholdPixels, getPrimitiveIteratorFor, getPrimitiveIteratorFor, getRedBits, getStencilBits, getTranslationRXToPixel, getTranslationRXToPixel, getTranslationRXToPixel, getTranslationRXToPixel, getVertexAccessorFor, getVertexAccessorFor, getViewToCanvasScale, getZCenterInView, interpolateOnPickSegmentInLocal, interpolateOnPickSegmentInLocal, interpolateOnPickSegmentInView, interpolateOnPickSegmentInView, isDepthSortTransparentEnabled, isDrawingEnabled, isFrustumCullEnabled, isHighlightingEnabled, isMaskingEnabled, isNavigationEnabled, isPickingEnabled, isPickSegmentSet, isSphereVisible, isTransparent, localToCanvas, localToCanvas, localToView, localToView, localToView, localToWorld, localToWorld, navigateToDefaultView, navigateToDefaultView, navigateToDefaultView, navigateToView, navigateToView, navigateToView, navigateToView, pickGeometry, pickGeometry, pickGeometry, pickSphereInView, pickSphereInView, popLocalToWorld, popLocalToWorld, postMasking, postScene, postSwap, prependInverseLocalToWorld, prependInverseLocalToWorld, prependLocalToWorld, prependLocalToWorld, preSwap, pushLocalToWorld, recenterZ, recenterZ, render, render, render, render, render, render, render, render, renderAccept, renderDepthOnly, renderDepthOnly, renderHighlighted, renderImpl, renderInView, renderTransparent, renderTransparent, renderTransparent, resetPendingMetrics, resetPickMetrics, resetRenderMetrics, rotateAboutDefaultCenter, saveFrame, saveFrame, saveFrame, saveFrameFailed, saveFrameFinished, saveNextFrame, saveNextFrame, saveNextFrame, setAmbientAlpha, setCanvas, setCanvasSize, setCanvasSize, setCMT, setDefaultRotationCenter, setDefaultView, setDefaultViewScale, setDefaultViewTXEM, setDefaultViewTXEMS, setHighlightColor, setHighlightFactor, setLocalToWorld, setLocalToWorld, setLongFrameWarningThreshold, setMaskAlpha, setPickPointOnCanvas, setPickSegmentInView, setPickThresholdPixels, setSymmetricZClip, setTraceOptions, setTraceOptions, setViewInMeters, setViewInPixels, setViewToCanvasScale, setZClip, startSavingFrames, startSavingFrames, startSavingFrames, startSavingFrames, startSavingFrames, startSavingFrames, startSavingFrames, startSavingFrames, stopSavingFrames, traceNextFrame, traceNextFrame, traceNextPickingFrame, unsetPickSegment, updateCMT, updateHighlightedMaterial, updatePickSegmentInLocal, updateProjection, updateWorldToView, updateWorldToView, viewToCanvas, viewToCanvas, viewToLocal, viewToLocal, viewToLocal, viewToWorld, viewToWorld, viewToWorld, worldToLocal, worldToLocal, worldToView, worldToView, worldToView, worldToViewDirty
private static final java.lang.String cvsid
public static final int TRACE_MSIM_EN
public static final int INITIAL_WIDTH
public static final int INITIAL_HEIGHT
public static final float DEF_MASK_ALPHA
Display3D.maskAlpha
public static final int MIN_RED_BITS
public static final int MIN_GREEN_BITS
public static final int MIN_BLUE_BITS
public static final int MIN_DEPTH_BITS
public static final int MIN_STENCIL_BITS
public static final int MIN_NUM_SAMPLES
public static final int MIN_ACCUM_RED_BITS
public static final int MIN_ACCUM_GREEN_BITS
public static final int MIN_ACCUM_BLUE_BITS
public static final int MIN_ACCUM_ALPHA_BITS
public static final float Z_CLIP
public static final double DEF_VIEW_SCALE
Initial world-to-view scale.
Takes model frame meters to physical meters.
public static final boolean DEF_FRAME_SAVE_WITH_CURSOR
public volatile boolean clearPickOnNav
UI
public volatile boolean clearPickCycleOnNav
UI
public volatile boolean maskPickCompliment
UI
public volatile boolean maskPickCycleCompliment
UI
public volatile boolean maskPickOccluding
UI
public volatile boolean highlightSelection
UI
public volatile boolean maskSelectionCompliment
UI
public volatile boolean setRotationCenterToPickedNodeOrigin
UI
protected boolean[] classCurrentlyVisible
Cache of EntityClass
settings during a render.
Confined to the render thread.
protected boolean[] classCurrentlyMasked
Cache of EntityClass
settings during a render.
Confined to the render thread.
protected boolean[] classCurrentlyPickable
Cache of EntityClass
settings during a render.
Confined to the render thread.
protected boolean[] classCurrentlyIndividuallyPickable
Cache of EntityClass
settings during a render.
Confined to the render thread.
protected boolean pickingThisFrame
Whether pick computations are being performed during this render.
Confined to the render thread.
protected vona.math.RX widgetFrameRX
Temp storage for widget frame transform.
Confined to the render thread.
protected vona.time.TimeMetrics renderLinkMetrics
protected vona.time.TimeMetrics renderJointMetrics
public Display(java.awt.GraphicsDevice gd, UI ui)
public void navigateToView(LinkageNode node, java.lang.String frame, boolean setRotationCenter, boolean setDefaultView, boolean setDefaultRotationCenter, boolean jump)
Covers Display3D.navigateToView(RX, boolean, boolean, boolean, boolean)
using LinkageNode.getSubFrameCMT(String)
.
public void navigateToView(LinkageNode node, java.lang.String frame, boolean setRotationCenter, boolean setDefaultView, boolean setDefaultRotationCenter)
navigateToView(LinkageNode, String, boolean, boolean, boolean,
boolean)
, always interpolates.
public void navigateToView(LinkageNode node, java.lang.String frame, boolean setRotationCenter)
navigateToView(LinkageNode, String, boolean, boolean, boolean,
boolean)
, always interpolates, does not set defaults.
public void navigateToView(LinkageNode node, boolean setRotationCenter)
navigateToView(LinkageNode, String, boolean, boolean, boolean,
boolean)
, canonical frame, always interpolates, does not set defaults.
public void navigateToView(LinkageNode node, java.lang.String frame)
navigateToView(LinkageNode, String, boolean, boolean, boolean,
boolean)
, always interpolates, does not set rotation center or
defaults.
public void navigateToView(LinkageNode node)
navigateToView(LinkageNode, String, boolean, boolean, boolean,
boolean)
, canonical frame, always interpolates, does not set rotation
center or defaults.
public void traceNextFrame(boolean tracePicking, boolean traceGeneric, boolean traceJOGL, boolean traceGL, boolean traceVertices, boolean traceMSim)
Enable tracing for next frame with given options.
See JOGLDisplay.traceNextFrame(boolean, boolean, boolean,
boolean, boolean)
.
traceMSim
- whether to emit MSim-specific render algorithm dbgprotected int getAllRenderTraceFlags()
Hook to get combination of all trace flags that apply to the render algorithm.
This impl adds JOGLDisplay.TRACE_JOGL_EN
to superclass impl.
This impl adds TRACE_MSIM_EN
to superclass impl.
getAllRenderTraceFlags
in class vona.ui.JOGLDisplay
protected boolean autoAddListenersToRXSInteractor()
Whether to call RXSInteractor.addListeners(java.awt.Component)
on Display3D.rxsInteractor
in Display3D.addCanvasListeners()
.
Default impl returns true. Subclasses can override if they don't want
to use Display3D.rxsInteractor
or if they want to add its listeners in
order after other listeners.
This impl returns false so that the ActionMapper
listeners can
be added first, as they may swallow some actions.
autoAddListenersToRXSInteractor
in class vona.ui.Display3D
protected void renderScene()
Hook called from generic Display3D.render()
to actually render the
scene.
The CMT at time of call will be the world-to-view transform; local-to-world is initialized to identity.
No Display3D
locks are held at time of call.
Default impl does nothing.
This impl acquires Controller.LOCK
, then calls renderTree(Link)
on the ground link.
classCurrentlyVisible
etc. are pre-computed, and if pickingThisFrame
and Display3D.pickingEnabled
then after rendering UI.initPickCycle()
and UI.runQueuedActions()
.
renderScene
in class vona.ui.Display3D
protected int renderTree(Link l)
Render the sub-tree rooted at l, respecting EntityClass.visibility
.
protected int renderTree(Joint j)
Render j and the sub-tree rooted at its child Link
, if
any, respecting EntityClass.visibility
.
protected void renderNodeWidget(vona.j3d.Widget w, LinkageNode node, java.lang.String frame)
protected void worldToViewChanged()
Hook called when the world-to-view transform has changed (e.g. due to navigation, default impl does nothing.
Note that this may be called after Display3D.worldToViewScale
and Display3D.worldToViewRX
have been updated but before the CMT has been updated or
applied.
Default impl does nothing.
This impl chains to super and then updates UI.manipulationInteractor
with the current Display3D.viewToCanvasScale
and
Display3D.worldToViewRX
, the inverse of which is set as the RXSInteractor.manipulationToWorld
transform.
Also, it does a UI.clearPick(boolean, boolean)
iff clearPickCycleOnNav
, including clearing the current pick iff clearPickOnNav
.
worldToViewChanged
in class vona.ui.Display3D
protected void projectionChanged()
Hook called when the projection transform has changed, default impl does nothing.
Note that this may be called after Display3D.viewToCanvasScale
and
Display3D.viewAABB
have been updated but before Display3D.applyProjection()
has happened.
Default impl does nothing.
This impl chains to super and then updates UI.manipulationInteractor
with the current Display3D.canvasSize
and Display3D.viewToCanvasScale
.
projectionChanged
in class vona.ui.Display3D
protected void rePicking()
Hook called from generic render when pick will be performed for a render.
Default impl does nothing.
This impl does a UI.clearPick()
, sets pickingThisFrame
,
and chains to the superclass impl.
rePicking
in class vona.ui.Display3D
protected boolean picked(javax.media.j3d.Geometry geometry, javax.media.j3d.Appearance appearance, int prim, float u)
Picking callback.
This is called for every pick intersection detected in Display3D.render(Geometry, Appearance, float[], float)
.
Default impl returns false.
This impl updates the current UI.pickMap
entry for
geometry and its enclosing Widget
, LinkageNode.SubFrame
, and
LinkageNode
, depending on which are EntityClass.individuallyPickable
, adding new entries as necessary.
picked
in class vona.ui.Display3D
prim
- the prim index of the intersection, or negative if picked by
bounds onlyu
- the signed distance along the pick segment (Display3D.pickStartInView
, Display3D.pickExtentInView
) of the intersection
normalized to the pick segment length. Note that this may imply a pick
intersection outside the view frustum, however, as long as Display3D.frustumCullEnabled
and Display3D.pickVisibleBoundsOnly
are set, then the
bounding sphere of geometry is known to intersect the view frustum.
Also, if the pick segment is itself known to be within the view frustum
(as it will be, e.g., when set by Display3D.setPickPointOnCanvas(float, float)
), and
Display3D.pickSegmentIntersectionsOnly
is set, then reported pick
intersections will always be within the view frustum.protected void preRender()
This impl does a JOGLDisplay.doFinish(boolean)
iff JOGLDisplay.doPreFinish
, and
applies any pending bg or light changes.
This impl clears pickingThisFrame
(it will be subsequently set
in rePicking()
if we are actually picking this frame), resets pick
metrics if UI.pickCycle
is empty, Display3D.rotateAboutDefaultCenter()
if not setRotationCenterToPickedNodeOrigin
, and then chains to the superclass
impl.
preRender
in class vona.ui.JOGLDisplay
protected boolean isHighlighted(javax.media.j3d.Geometry geometry, javax.media.j3d.Appearance appearance)
Hook that generic renderer uses to determine whether a
geometry/appearance combination should be categorized as
highlighted, if Display3D.highlightingEnabled
.
Default impl returns false.
Let n and w be the containing LinkageNode
and
Widget
of geometry, if any, and let s be the
subframe of n associated to w, if any. This impl returns
true if
UI.selection
, highlightSelection
,
and n, s, w or geometry is selectedisHighlighted
in class vona.ui.Display3D
protected boolean isMasked(javax.media.j3d.Geometry geometry, javax.media.j3d.Appearance appearance)
Hook that generic renderer uses to determine whether a
geometry/appearance combination should be categorized as
masked, if Display3D.maskingEnabled
.
Default impl returns false.
Let n and w be the containing LinkageNode
and
Widget
of geometry, if any, let s be the subframe of
n associated to w, if any, and let nc, sc, and
wc be their most specific entity classes. This impl returns true
if
UI.maskLinkagesBeyondThreshold
is set and the Linkage
of n has Linkage.distanceToPickedLinkage
greater than
UI.maskLinkageThreshold
EntityClass.Visibility.MASKED
UI.pickIndex
geq 0), maskPickCompliment
, and neither n nor s nor w nor
geometry is the current pickmaskPickCycleCompliment
, and neither
n nor s nor w nor geometry is in the current
pick cyclemaskPickOccluding
, and n,
s, w, or geometry is in the pick cycle nearer to the
viewer than the current pickUI.selection
, maskSelectionCompliment
, and neither n nor s w nor
geometry are currently selectedisMasked
in class vona.ui.Display3D
protected boolean isPickable(javax.media.j3d.Geometry geometry, javax.media.j3d.Appearance appearance)
Check if the given geometry should be considered pickable.
Default impl returns true.
This impl returns true if the most specific entity class of the
containing LinkageNode
or Widget
is EntityClass.pickable
.
isPickable
in class vona.ui.Display3D
protected java.lang.String getInfo(javax.media.j3d.Geometry geometry, javax.media.j3d.Appearance appearance)
Get an identifying string for geometry and appearance for use in tracing and dbg.
Default impl calls J3DUtils.getInfo(Geometry)
.
This impl prepends node.widget.geometry path suffix to superclass info.
getInfo
in class vona.ui.Display3D
protected void dumpRenderMetricsImpl(java.io.PrintStream s)
dumpRenderMetricsImpl
in class vona.ui.JOGLDisplay
protected void resetRenderMetricsImpl()
resetRenderMetricsImpl
in class vona.ui.JOGLDisplay