Aviatrix3D
2.0 Dev

org.j3d.aviatrix3d.pipeline.graphics
Class NullCullStage

java.lang.Object
  extended byorg.j3d.aviatrix3d.pipeline.graphics.BaseCullStage
      extended byorg.j3d.aviatrix3d.pipeline.graphics.NullCullStage
All Implemented Interfaces:
CullStage, GraphicsCullStage

public class NullCullStage
extends BaseCullStage

Handles the scenegraph maintenance and culling operations.

The culling phase generates a list of nodes to render. A future optimization will sort the render list by OGL state.

By default, the implementation will walk into shape3Ds looking for any offscreen textures to be rendered. If you know that you do not have any in the scene, then you can set an internal flag to not look for them, thus achieving a simple performance boost.

Since this is a null culling stage, and thus no culling is performed, if the scene graph contains instances of Cullable, they are ignored and traversal stops at that point.

Version:
$Revision: 3.5 $
Author:
Justin Couch

Field Summary
 
Fields inherited from class org.j3d.aviatrix3d.pipeline.graphics.BaseCullStage
activeParent, checkOffscreens, clipList, clipTxList, currentViewpointPath, eyePoint, fogStack, lastClip, lastFogStack, lastLight, lastOutputLayer, lastOutputList, lastSubscene, lastTxStack, layerCounts, layersTmp, LIGHT_INCREMENT, LIGHT_START_SIZE, lightList, lightTxList, LIST_INCREMENT, LIST_START_LENGTH, matrixUtils, orientationMatrix, outputLayers, outputSceneParents, pendingParents, pendingSubscenes, processedPBufferTextures, receiver, screenOrientation, SHARED_BG_MSG, SHARED_VP_MSG, terminate, textureUnits, transformStack, useEyePoint, useOrientation, validSceneParents, viewMatrix1, viewMatrix2, visitedNodes, workCullList
 
Constructor Summary
NullCullStage()
          Create a basic instance of this class with the list assuming there are no off-screen buffers in use for the initial internal setup.
NullCullStage(int numSurfaces)
          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(RenderPass pass, int passNumber, int subsceneId, int layerId, int viewIndex, int layerIndex, int buffer)
          Update and cull the a single pass from a multipass rendering.
protected  void cullScene(SimpleScene scene, int subsceneId, int layerId, int viewIndex, int layerIndex, int buffer)
          Update and cull the scenegraph.
protected  int cullSingle(Group node, int buffer)
          Update and cull the scenegraph of a single node without doing any other processing.
 
Methods inherited from class org.j3d.aviatrix3d.pipeline.graphics.BaseCullStage
checkForOffscreens, cleanupOldRefs, cull, cull2DLayer, cullCompositeLayer, cullCompositeViewport, cullMultipassViewport, cullMultipassViewportLayer, cullSimpleLayer, cullSimpleViewport, cullViewport, fillEnvData, fillEnvData, fillEnvData, halt, isOffscreenCheckEnabled, processSubsceneLayers, resizeClipList, resizeCullList, resizeFogStack, resizeLightList, resizeOffscreenList, resizeOutputLists, resizeStack, setCulledGeometryReceiver, setEyePointOffset, setOffscreenCheckEnabled, setScreenOrientation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullCullStage

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


NullCullStage

public NullCullStage(int numSurfaces)
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
Method Detail

cullScene

protected void cullScene(SimpleScene scene,
                         int subsceneId,
                         int layerId,
                         int viewIndex,
                         int layerIndex,
                         int buffer)
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
viewIndex - The index of the viewport in the parent ViewportCollection
layerIndex - The index of the layer within the viewport
buffer - The buffer ID to use to output the data to when multi-threaded
subsceneId - The index of the subscene in the viewport output
layerId - The index of the layer in the output

cullRenderPass

protected void cullRenderPass(RenderPass pass,
                              int passNumber,
                              int subsceneId,
                              int layerId,
                              int viewIndex,
                              int layerIndex,
                              int buffer)
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
buffer - The buffer ID to use to output the data to when multi-threaded

cullSingle

protected int cullSingle(Group node,
                         int buffer)
Update and cull the scenegraph of a single node without doing any other processing. This generates an ordered list of nodes to render. It will not return until the culling is complete.

Specified by:
cullSingle in class BaseCullStage
Parameters:
node - The root node to start the cull from
buffer - The buffer ID to use to output the data to when multi-threaded
Returns:
The index of the last item on the cull list

Aviatrix3D
2.0 Dev

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