Aviatrix3D
2.1.0

org.j3d.renderer.aviatrix3d.pipeline
Class DebugFrustumCullStage

java.lang.Object
  extended by org.j3d.aviatrix3d.pipeline.graphics.BaseCullStage
      extended by org.j3d.renderer.aviatrix3d.pipeline.DebugFrustumCullStage
All Implemented Interfaces:
CullStage, GraphicsCullStage

public class DebugFrustumCullStage
extends BaseCullStage

Implementation of view frustum culling that provides visual debugging information in the scene.

For each object in the scene, this will render a box around its bounds, including each grouping node in the scene heirarchy.

Version:
$Revision: 1.5 $
Author:
Alan Hudson

Field Summary
 
Fields inherited from class org.j3d.aviatrix3d.pipeline.graphics.BaseCullStage
activeParent, appearanceStack, checkOffscreens, clipList, clipTxList, currentViewpointPath, errorReporter, eyePoint, fogStack, lastAppearanceStack, lastClip, lastFogStack, lastLight, lastOutputLayer, lastOutputList, lastSubscene, lastTxStack, layersTmp, LIGHT_INCREMENT, LIGHT_START_SIZE, lightList, lightTxList, LIST_INCREMENT, LIST_START_LENGTH, matrixUtils, orientationMatrix, outputLayerCounts, outputLayers, outputSceneParents, pendingParents, pendingSubscenes, processedPBufferTextures, screenOrientation, terminate, transformStack, useEyePoint, useOrientation, validSceneParents, viewMatrix1, viewMatrix2, workCullList, workLayerCounts, workLayers
 
Constructor Summary
DebugFrustumCullStage(boolean useGlobalView)
          Create a basic instance of this class with the list assuming there are no off-screen buffers in use for the initial internal setup.
DebugFrustumCullStage(int numSurfaces, boolean useGlobalView)
          Create a basic instance of this class with the list initial internal setup for the given number of renderable surfaces.
 
Method Summary
protected  void cullRenderPass(RenderPassCullable pass, int passNumber, int subsceneId, int layerId, int viewIndex, int layerIndex)
          Update and cull the a single pass from a multipass rendering.
protected  void cullScene(RenderPassCullable scene, int subsceneId, int layerId, int viewIndex, int layerIndex)
          Update and cull the scenegraph.
protected  void cullScene2D(RenderPassCullable scene, int subsceneId, int layerId, int viewIndex, int layerIndex)
          Update and cull a 2D scenegraph.
protected  void fillMultipassEnvData(SceneCullable scene, GraphicsEnvironmentData envData)
          Take a simple scene and fill in a GraphicsEnvironmentData instance.
protected  void fillRenderPassEnvData(RenderPassCullable pass, GraphicsEnvironmentData envData, BufferDetails bufferData)
          Take a simple scene and fill in a GraphicsEnvironmentData instance.
protected  void fillSingleEnvData(SceneCullable scene, GraphicsEnvironmentData envData)
          Take a simple scene and fill in a GraphicsEnvironmentData instance.
 
Methods inherited from class org.j3d.aviatrix3d.pipeline.graphics.BaseCullStage
checkForOffscreens, cleanupOldRefs, cull, cullMultipassViewportLayer, cullSingleViewportLayer, cullViewport, fill2DEnvData, halt, isOffscreenCheckEnabled, processLayer, resizeAppearanceStack, resizeClipList, resizeCullList, resizeFogStack, resizeLightList, resizeOffscreenList, resizeOutputLists, resizeStack, setCulledGeometryReceiver, setErrorReporter, setEyePointOffset, setOffscreenCheckEnabled, setScreenOrientation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DebugFrustumCullStage

public DebugFrustumCullStage(boolean useGlobalView)
Create a basic instance of this class with the list assuming there are no off-screen buffers in use for the initial internal setup.

Parameters:
useGlobalView - The rendered viewpoint is set to look down on the entire scene if set true, otherwise uses the normal value

DebugFrustumCullStage

public DebugFrustumCullStage(int numSurfaces,
                             boolean useGlobalView)
Create a basic instance of this class with the list initial internal setup for the given number of renderable surfaces. The size is just an initial esstimate, and is used for optimisation purposes to prevent frequent array reallocations internally. As such, the number does not have to be perfect, just good enough.

Parameters:
numSurfaces - Total number of surfaces to prepare rendering for
useGlobalView - The rendered viewpoint is set to look down on the entire scene if set true, otherwise uses the normal value
Method Detail

cullScene

protected void cullScene(RenderPassCullable scene,
                         int subsceneId,
                         int layerId,
                         int viewIndex,
                         int layerIndex)
Update and cull the scenegraph. This generates an ordered list of nodes to render. It will not return until the culling is complete.

Specified by:
cullScene in class BaseCullStage
Parameters:
scene - The scene instance to cull
subsceneId - The index of the subscene in the viewport output
layerId - The index of the layer in the output
viewIndex - The index of the viewport in the parent ViewportCollection
layerIndex - The index of the layer within the viewport

cullScene2D

protected void cullScene2D(RenderPassCullable scene,
                           int subsceneId,
                           int layerId,
                           int viewIndex,
                           int layerIndex)
Update and cull a 2D scenegraph. This generates an ordered list of nodes to render. It will not return until the culling is complete.

Specified by:
cullScene2D in class BaseCullStage
Parameters:
scene - The scene instance to cull
subsceneId - The index of the subscene in the viewport output
layerId - The index of the layer in the output
viewIndex - The index of the viewport in the parent ViewportCollection
layerIndex - The index of the layer within the viewport

cullRenderPass

protected void cullRenderPass(RenderPassCullable pass,
                              int passNumber,
                              int subsceneId,
                              int layerId,
                              int viewIndex,
                              int layerIndex)
Update and cull the a single pass from a multipass rendering. This generates an ordered list of nodes to render in the same was as a normal scene, but with fewer items updated, such as only a single background for all passes. It will not return until the culling is complete.

Specified by:
cullRenderPass in class BaseCullStage
Parameters:
pass - The rendering pass instance to cull
subsceneId - The index of the subscene in the viewport output
layerId - The index of the layer in the output
viewIndex - The index of the viewport in the parent ViewportCollection
layerIndex - The index of the layer within the viewport

fillSingleEnvData

protected void fillSingleEnvData(SceneCullable scene,
                                 GraphicsEnvironmentData envData)
Take a simple scene and fill in a GraphicsEnvironmentData instance.

Overrides:
fillSingleEnvData in class BaseCullStage
Parameters:
scene - The scene to take data from
envData - Data instance to copy it to

fillMultipassEnvData

protected void fillMultipassEnvData(SceneCullable scene,
                                    GraphicsEnvironmentData envData)
Take a simple scene and fill in a GraphicsEnvironmentData instance.

Overrides:
fillMultipassEnvData in class BaseCullStage
Parameters:
scene - The scene to take data from
envData - Data instance to copy it to

fillRenderPassEnvData

protected void fillRenderPassEnvData(RenderPassCullable pass,
                                     GraphicsEnvironmentData envData,
                                     BufferDetails bufferData)
Take a simple scene and fill in a GraphicsEnvironmentData instance.

Overrides:
fillRenderPassEnvData in class BaseCullStage
Parameters:
pass - The render pass to take data from
envData - Data instance to copy it to
bufferData - The object to copy the extra buffer state to

Aviatrix3D
2.1.0

Latest Info from http://aviatrix3d.j3d.org/
Copyright © 2003 - 2009 j3d.org