|
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
org.j3d.aviatrix3d.pipeline.graphics.BaseStateSortStage
public abstract class BaseStateSortStage
Implementation of common functionality used by sort stage that implement state sorting.
Field Summary | |
---|---|
protected java.lang.Object[] |
clipTmp
Temp array for fetching clipPlane objects from the HashSets below. |
protected AppearanceRenderable |
currentAppearance
The currently valid appearance |
protected AppearanceAttributeRenderable |
currentBlendAttr
The currently valid blend attributes |
protected org.j3d.util.HashSet |
currentClipPlanes
Set of current clip planes that are being processed |
protected AppearanceAttributeRenderable |
currentDepthAttr
The currently valid depth buffer attributes |
protected Renderable |
currentFog
The currently valid local fog |
protected java.util.Stack<VisualDetails> |
currentLights
List of current lights that are being processed |
protected AppearanceAttributeRenderable |
currentLineAttr
The currently valid line attributes |
protected ObjectRenderable |
currentMaterial
The currently valid material |
protected AppearanceAttributeRenderable |
currentPointAttr
The currently valid point attributes |
protected AppearanceAttributeRenderable |
currentPolyAttr
The currently valid polygon attributes |
protected ShaderRenderable |
currentShader
The currently valid GLSlang shader |
protected ComponentRenderable |
currentShaderArgs
The currently valid shader arguments (GLSLang) |
protected AppearanceAttributeRenderable |
currentStencilAttr
The currently valid stencil buffer attributes |
protected ComponentRenderable[] |
currentTextures
Listing of currently valid textures |
protected static int |
GUESS_NUM_COMPONENTS
The guess at the number of components in a shape |
protected org.j3d.util.HashSet |
keepClipPlanes
Set to hold onto clip planes that are common between last node and this |
protected java.util.Stack<VisualDetails> |
keepLights
List to hold onto lights that are common between last node and this |
protected java.util.HashMap<VisualDetails,java.lang.Integer> |
lightIdMap
Mapping of the VisualDetails instance to the global ID |
protected VisualDetails[] |
newClipPlanes
Temp array for holding new clip planes on the object being processed |
protected VisualDetails[] |
newLights
Temp array for holdin new lights on the object being processed |
protected int |
numTextures
Number of valid textures currently active |
protected org.j3d.util.HashSet |
oldClipPlanes
Set for holding the difference between the current and new sets |
protected java.util.Stack<VisualDetails> |
oldLights
List of lights for holding the difference between the current and new light lists |
protected StateSortComparator |
stateComparator
Comparator instance for the state sorting |
protected static java.lang.Integer[] |
TEX_IDS
Listing of int to Integer equivalents for texture IDs |
Fields inherited from class org.j3d.aviatrix3d.pipeline.graphics.BaseSortStage |
---|
commandList, errorReporter, instructionMap, lastGlobalId, LIST_START_SIZE, terminate |
Constructor Summary | |
---|---|
protected |
BaseStateSortStage(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 int |
appendClipPlanes(GraphicsCullOutputDetails node,
GraphicsInstructions instr,
int offset)
Append the clip planess onto the existing list. |
protected int |
appendLights(GraphicsCullOutputDetails node,
GraphicsInstructions instr,
int offset)
Append the lights onto the existing list. |
protected int |
appendObject(GraphicsCullOutputDetails node,
GraphicsInstructions instr,
int offset)
Append a single object onto the existing list. |
protected int |
cleanupObjects(GraphicsInstructions instr,
int offset)
At the end of the scene, we need to make sure that we've turned off all the lights, clip planes and current rendering state that is left. |
protected int |
cleanupVisuals(GraphicsInstructions instr,
int offset)
Convenience method to clear all the current visual information. |
protected int |
updateBlendAttribs(AppearanceRenderable app,
GraphicsInstructions instr,
int offset)
Check on the blending attributes setup and change as necessary. |
protected int |
updateDepthAttribs(AppearanceRenderable app,
GraphicsInstructions instr,
int offset)
Check on the depth attributes setup and change as necessary. |
protected int |
updateFog(Renderable fog,
GraphicsInstructions instr,
int offset)
Check on the material setup and change as necessary. |
protected int |
updateLineAttribs(AppearanceRenderable app,
GraphicsInstructions instr,
int offset)
Check on the line attributes setup and change as necessary. |
protected int |
updateMaterial(AppearanceRenderable app,
GraphicsInstructions instr,
int offset)
Check on the material setup and change as necessary. |
protected int |
updatePointAttribs(AppearanceRenderable app,
GraphicsInstructions instr,
int offset)
Check on the polygon attributes setup and change as necessary. |
protected int |
updatePolyAttribs(AppearanceRenderable app,
GraphicsInstructions instr,
int offset)
Check on the polygon attributes setup and change as necessary. |
protected int |
updateShader(AppearanceRenderable app,
GraphicsInstructions instr,
int offset)
Check on the shader setup and change as necessary. |
protected int |
updateStencilAttribs(AppearanceRenderable app,
GraphicsInstructions instr,
int offset)
Check on the stencil attributes setup and change as necessary. |
protected int |
updateTextures(AppearanceRenderable app,
GraphicsInstructions instr,
int offset)
Check on the texture listing setup and change as necessary. |
Methods inherited from class org.j3d.aviatrix3d.pipeline.graphics.BaseSortStage |
---|
estimateInstructionSize, estimateInstructionSize, halt, realloc, setErrorReporter, setSortedGeometryReceiver, sort, sort2DNodes, sortNodes |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final int GUESS_NUM_COMPONENTS
protected static final java.lang.Integer[] TEX_IDS
protected StateSortComparator stateComparator
protected VisualDetails[] newLights
protected java.util.Stack<VisualDetails> currentLights
protected java.util.Stack<VisualDetails> oldLights
protected java.util.Stack<VisualDetails> keepLights
protected java.util.HashMap<VisualDetails,java.lang.Integer> lightIdMap
protected VisualDetails[] newClipPlanes
protected java.lang.Object[] clipTmp
protected org.j3d.util.HashSet currentClipPlanes
protected org.j3d.util.HashSet oldClipPlanes
protected org.j3d.util.HashSet keepClipPlanes
protected AppearanceRenderable currentAppearance
protected ObjectRenderable currentMaterial
protected AppearanceAttributeRenderable currentPolyAttr
protected AppearanceAttributeRenderable currentLineAttr
protected AppearanceAttributeRenderable currentPointAttr
protected AppearanceAttributeRenderable currentBlendAttr
protected AppearanceAttributeRenderable currentDepthAttr
protected AppearanceAttributeRenderable currentStencilAttr
protected ShaderRenderable currentShader
protected ComponentRenderable currentShaderArgs
protected Renderable currentFog
protected ComponentRenderable[] currentTextures
protected int numTextures
Constructor Detail |
---|
protected BaseStateSortStage(int numSurfaces)
Method Detail |
---|
protected int appendObject(GraphicsCullOutputDetails node, GraphicsInstructions instr, int offset)
node
- The node instance to look at appendingoffset
- The distance into instr array of values to startinstr
- Instruction instant to put the details into
protected int appendLights(GraphicsCullOutputDetails node, GraphicsInstructions instr, int offset)
node
- The node instance to look at appendingoffset
- The distance into instr array of values to startinstr
- Instruction instant to put the details into
protected int appendClipPlanes(GraphicsCullOutputDetails node, GraphicsInstructions instr, int offset)
node
- The node instance to look at appendingoffset
- The distance into instr array of values to startinstr
- Instruction instant to put the details into
protected int updateFog(Renderable fog, GraphicsInstructions instr, int offset)
fog
- The Fog instance to source info fromoffset
- The distance into instr array of values to startinstr
- Instruction instant to put the details into
protected int updateShader(AppearanceRenderable app, GraphicsInstructions instr, int offset)
app
- The appearance instance to source info fromoffset
- The distance into instr array of values to startinstr
- Instruction instant to put the details into
protected int updateMaterial(AppearanceRenderable app, GraphicsInstructions instr, int offset)
app
- The appearance instance to source info fromoffset
- The distance into instr array of values to startinstr
- Instruction instant to put the details into
protected int updatePolyAttribs(AppearanceRenderable app, GraphicsInstructions instr, int offset)
app
- The appearance instance to source info fromoffset
- The distance into instr array of values to startinstr
- Instruction instant to put the details into
protected int updateLineAttribs(AppearanceRenderable app, GraphicsInstructions instr, int offset)
app
- The appearance instance to source info fromoffset
- The distance into instr array of values to startinstr
- Instruction instant to put the details into
protected int updateDepthAttribs(AppearanceRenderable app, GraphicsInstructions instr, int offset)
app
- The appearance instance to source info fromoffset
- The distance into instr array of values to startinstr
- Instruction instant to put the details into
protected int updateStencilAttribs(AppearanceRenderable app, GraphicsInstructions instr, int offset)
app
- The appearance instance to source info fromoffset
- The distance into instr array of values to startinstr
- Instruction instant to put the details into
protected int updatePointAttribs(AppearanceRenderable app, GraphicsInstructions instr, int offset)
app
- The appearance instance to source info fromoffset
- The distance into instr array of values to startinstr
- Instruction instant to put the details into
protected int updateBlendAttribs(AppearanceRenderable app, GraphicsInstructions instr, int offset)
app
- The appearance instance to source info fromoffset
- The distance into instr array of values to startinstr
- Instruction instant to put the details into
protected int updateTextures(AppearanceRenderable app, GraphicsInstructions instr, int offset)
app
- The appearance instance to source info fromoffset
- The distance into instr array of values to startinstr
- Instruction instant to put the details into
protected int cleanupObjects(GraphicsInstructions instr, int offset)
offset
- The distance into instr array of values to startinstr
- Instruction instant to put the details into
protected int cleanupVisuals(GraphicsInstructions instr, int offset)
offset
- The distance into instr array of values to startinstr
- Instruction instant to put the details into
|
Aviatrix3D 2.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |