j3d.org Aviatrix3D

org.j3d.aviatrix3d
Interface CullStage

All Known Implementing Classes:
NullCullStage, SimpleFrustumCullStage

public interface CullStage

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.

The culling stage is responsible for looking at the offscreen renderable surfaces as well as the main screen. Since most scenes will not require any offscreen rendering, convenience methods are defined to allow the user to turn on/off these checks. Offscreen rendering, and the checking for extra renderables can be a huge CPU hog so it is advisable to make sure that it is turned off if you don't need it. An ideal implementation will be able to handle dynamically switching between the two states between frames without the need to restart.

Version:
$Revision: 1.6 $
Author:
Justin Couch

Method Summary
 void cull(Scene scene, int buffer)
          Update and cull the scenegraph.
 boolean isOffscreenCheckEnabled()
          Find out what the current offscreen check state is.
 void setCulledGeometryReceiver(CulledGeometryReceiver sgr)
          Register a reciever for the output of the sorter.
 void setOffscreenCheckEnabled(boolean state)
          Set the flag for whether to check for offscreen textures or not.
 

Method Detail

setOffscreenCheckEnabled

public void setOffscreenCheckEnabled(boolean state)
Set the flag for whether to check for offscreen textures or not. By default, this flag is set to true.

Parameters:
state - true if offscreen textures should be looked for

isOffscreenCheckEnabled

public boolean isOffscreenCheckEnabled()
Find out what the current offscreen check state is.

Returns:
true if the checking is being performed

cull

public void cull(Scene scene,
                 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.

Parameters:
scene - The scene instance to cull
buffer - The buffer ID to use to output the data to when multi-threaded

setCulledGeometryReceiver

public void setCulledGeometryReceiver(CulledGeometryReceiver sgr)
Register a reciever for the output of the sorter. If the value is null, it will clear the currently set receiver.

Parameters:
sgr - The receiver instance to add or null

j3d.org Aviatrix3D

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