|
Aviatrix3D 2.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.j3d.aviatrix3d.pipeline.graphics.BaseSortStage
public abstract class BaseSortStage
Implementation of the common code needed by all sort stage implementations.
Field Summary | |
---|---|
protected GraphicsInstructions[] |
commandList
Output array for passing on to the receiver |
protected org.j3d.util.ErrorReporter |
errorReporter
Local reporter to put errors in |
protected java.util.HashMap<OffscreenBufferRenderable,GraphicsInstructions> |
instructionMap
Map of the first occurance of a scene parent to it's render instruction |
protected int |
lastGlobalId
A semi-unique ID counter used for assigning light IDs. |
protected static int |
LIST_START_SIZE
The initial size of the instruction list |
protected boolean |
terminate
Flag indicating a shutdown of the current processing is requested |
Constructor Summary | |
---|---|
protected |
BaseSortStage(int numSurfaces)
Create an empty sorting stage that initialises the internal structures to assume that there is a minumum number of surfaces, both on and offscreen. |
Method Summary | |
---|---|
protected abstract int |
estimateInstructionSize(MultipassRenderBucket scene)
Estimate the required size of the instruction list needed for this scene to be processed. |
protected abstract int |
estimateInstructionSize(SceneRenderBucket scene)
Estimate the required size of the instruction list needed for this scene to be processed. |
void |
halt()
Force a halt of the current processing. |
protected void |
realloc(GraphicsInstructions instr,
int reqdSize)
Reallocate the renderList and renderOps arrays. |
void |
setErrorReporter(org.j3d.util.ErrorReporter reporter)
Register an error reporter with the engine so that any errors generated by the node's internals can be reported in a nice, pretty fashion. |
void |
setSortedGeometryReceiver(SortedGeometryReceiver sgr)
Register a reciever for the output of the sorter. |
void |
sort(GraphicsRequestData otherData,
GraphicsProfilingData profilingData,
ViewportCollection[][] layers,
int[] numLayers,
int numScenes,
OffscreenBufferRenderable[][] sceneParents)
Sort the listing of layers and nodes. |
protected abstract int |
sort2DNodes(GraphicsCullOutputDetails[] nodes,
int numNodes,
GraphicsEnvironmentData data,
GraphicsInstructions instr,
int instrCount)
Sort a single set of 2D nodes into the output details of a single layer of a single viewport and place in the provided GraphicsInstructions instance. |
protected abstract int |
sortNodes(GraphicsCullOutputDetails[] nodes,
int numNodes,
GraphicsEnvironmentData data,
GraphicsInstructions instr,
int instrCount)
Sort a single set of nodes into the output details of a single layer of a single viewport and place in the provided GraphicsInstructions instance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final int LIST_START_SIZE
protected GraphicsInstructions[] commandList
protected int lastGlobalId
protected java.util.HashMap<OffscreenBufferRenderable,GraphicsInstructions> instructionMap
protected boolean terminate
protected org.j3d.util.ErrorReporter errorReporter
Constructor Detail |
---|
protected BaseSortStage(int numSurfaces)
numSurfaces
- The number of surfaces that we're likely to
encounterMethod Detail |
---|
public void sort(GraphicsRequestData otherData, GraphicsProfilingData profilingData, ViewportCollection[][] layers, int[] numLayers, int numScenes, OffscreenBufferRenderable[][] sceneParents)
For the 2D array of layers, it contains the list of final subscenes to send to the final stage, with the second dimension describing the layers, in rendering order. The first item will always be the main scene that gets rendered to the canvas.
For the 2D array sceneParent, it allows for mapping the output of internal scenes to the holding texture node. Index 0 is the direct owner of the scene contents. Index 1 is the scene parent of the scene included (needed for pBuffer GL context handling at render time). If this second one is null, then the parent is the main canvas that is being rendered to.
sort
in interface GraphicsSortStage
otherData
- data to be passed along unprocessedprofilingData
- The timing and load datalayers
- The list of layers that need to be further processednumLayers
- The number of valid layers in each scene to processnumScenes
- The number of valid scenes to processsceneParents
- Parent node that holds the subscene in the main
scene graphpublic void setSortedGeometryReceiver(SortedGeometryReceiver sgr)
setSortedGeometryReceiver
in interface GraphicsSortStage
sgr
- The receiver instance to add or nullpublic void halt()
halt
in interface GraphicsSortStage
public void setErrorReporter(org.j3d.util.ErrorReporter reporter)
setErrorReporter
in interface GraphicsSortStage
reporter
- The instance to use or nullprotected abstract int sortNodes(GraphicsCullOutputDetails[] nodes, int numNodes, GraphicsEnvironmentData data, GraphicsInstructions instr, int instrCount)
nodes
- The list of nodes to perform sorting onnumNodes
- The number of valid items in the nodes arraydata
- The environment data used during sortinginstr
- Instruction instant to put the details intoinstrCount
- Offset of current number of valid instructions
protected abstract int sort2DNodes(GraphicsCullOutputDetails[] nodes, int numNodes, GraphicsEnvironmentData data, GraphicsInstructions instr, int instrCount)
nodes
- The list of nodes to perform sorting onnumNodes
- The number of valid items in the nodes arraydata
- The environment data used during sortinginstr
- Instruction instant to put the details intoinstrCount
- Offset of current number of valid instructions
protected abstract int estimateInstructionSize(SceneRenderBucket scene)
scene
- The scene bucket to use for the source
protected abstract int estimateInstructionSize(MultipassRenderBucket scene)
scene
- The scene bucket to use for the source
protected void realloc(GraphicsInstructions instr, int reqdSize)
instr
- The instructions to resize.reqdSize
- The minimum required size
|
Aviatrix3D 2.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |