Aviatrix3D
2.1.0

org.j3d.aviatrix3d.pipeline.graphics
Interface GraphicsCullStage

All Superinterfaces:
CullStage
All Known Implementing Classes:
BaseCullStage, DebugFrustumCullStage, FrustumCullStage, GenericCullStage, NullCullStage, SimpleFrustumCullStage

public interface GraphicsCullStage
extends CullStage

Handles the scenegraph per-frame culling operations.

The culling phase generates a list of leaf nodes to render by removing non-required sections of the scene graph. How this culling is performed (if at all) is dependent on the implementation of this class. All that is defined is a complete scene graph as input, and a grouped set of nodes based on what must be kept together from a rendering perspective. Two typical culling approaches are view frustum and BSP. Others may also be implemented dependent on the application domain. Implementations may also work concepts that are not 3D geometry-based, such as audio and haptics.

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.

Output is to be sent to the registered listener.

Version:
$Revision: 3.0 $
Author:
Justin Couch

Method Summary
 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 setEyePointOffset(float x, float y, float z)
          Set the eyepoint offset from the centre position.
 void setOffscreenCheckEnabled(boolean state)
          Set the flag for whether to check for offscreen textures or not.
 void setScreenOrientation(float x, float y, float z, float a)
          Set the orientation of this screen relative to the user's normal view direction.
 
Methods inherited from interface org.j3d.aviatrix3d.pipeline.CullStage
cull, halt, setErrorReporter
 

Method Detail

setOffscreenCheckEnabled

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

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

Returns:
true if the checking is being performed

setCulledGeometryReceiver

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

setEyePointOffset

void setEyePointOffset(float x,
                       float y,
                       float z)
Set the eyepoint offset from the centre position. This is used to model offset view frustums, such as multiple displays or a powerwall. This method will be called with the appropriate values from the RenderPipeline that this culler is inserted into.

Parameters:
x - The x axis offset
y - The y axis offset
z - The z axis offset

setScreenOrientation

void setScreenOrientation(float x,
                          float y,
                          float z,
                          float a)
                          throws java.lang.IllegalArgumentException
Set the orientation of this screen relative to the user's normal view direction. The normal orientation of the screen is along the negative Z axis. This method provides and axis-angle reorientation of that direction to one that is facing the screen. Typically this will just involve a rotation around the Y axis of some amount (45 and 90 deg being the most common used in walls and caves). This method will be called with the appropriate values from the RenderPipeline that this culler is inserted into.

Parameters:
x - The x axis component
y - The y axis component
z - The z axis component
a - The angle to rotate around the axis in radians
Throws:
java.lang.IllegalArgumentException - The length of the axis is zero

Aviatrix3D
2.1.0

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