|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jme.renderer.pass.Pass
public abstract class Pass
Pass
encapsulates logic necessary for rendering one or more
steps in a multipass technique.
Rendering:
When renderPass is called, a check is first made to see if the
pass isEnabled(). Then any states set on this pass are enforced via
Spatial.enforceState(RenderState). This is useful for doing things such
as causing this pass to be blended to a previous pass via enforcing an
BlendState, etc. Next, doRender(Renderer) is called to do the actual
rendering work. Finally, any enforced states set before this pass was
run are restored.
Field Summary | |
---|---|
protected RenderContext<?> |
context
|
protected boolean |
enabled
if false, pass will not be updated or rendered. |
protected RenderState[] |
passStates
RenderStates registered with this pass - if a given state is not null it overrides the corresponding state set during rendering. |
protected RenderState[] |
savedStates
a place to internally save previous states setup before rendering this pass |
protected java.util.ArrayList<Spatial> |
spatials
list of spatials registered with this pass. |
protected float |
zFactor
offset params to use to differentiate multiple passes of the same scene in the zbuffer. |
protected float |
zOffset
|
Constructor Summary | |
---|---|
Pass()
|
Method Summary | |
---|---|
void |
add(Spatial toAdd)
|
protected void |
applyPassStates()
|
void |
cleanUp()
|
void |
clearPassState(int renderStateType)
Deprecated. As of 2.0, use clearPassState(com.jme.scene.state.RenderState.StateType) instead. |
void |
clearPassState(RenderState.StateType type)
Clears an enforced render state by setting it to null. |
void |
clearPassStates()
sets all enforced states to null. |
boolean |
contains(Spatial s)
|
protected abstract void |
doRender(Renderer r)
|
protected void |
doUpdate(float tpf)
|
Spatial |
get(int index)
|
RenderState |
getRenderState(int type)
Deprecated. As of 2.0, use getRenderState(com.jme.scene.state.RenderState.StateType) instead. |
RenderState |
getRenderState(RenderState.StateType type)
Returns the requested RenderState that this Pass currently has set or null if none is set. |
float |
getZFactor()
|
float |
getZOffset()
|
boolean |
isEnabled()
|
boolean |
remove(Spatial toRemove)
|
void |
removeAll()
|
void |
renderPass(Renderer r)
if enabled, set the states for this pass and then render. |
protected void |
resetOldStates()
|
void |
setEnabled(boolean enabled)
|
void |
setPassState(RenderState state)
Enforce a particular state. |
void |
setZFactor(float factor)
Sets the polygon offset param - factor - for this Pass. |
void |
setZOffset(float offset)
Sets the polygon offset param - offset - for this Pass. |
int |
size()
|
void |
updatePass(float tpf)
if enabled, call doUpdate to update information for this pass. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.ArrayList<Spatial> spatials
protected boolean enabled
protected float zFactor
protected float zOffset
protected RenderState[] passStates
protected RenderState[] savedStates
protected RenderContext<?> context
Constructor Detail |
---|
public Pass()
Method Detail |
---|
public final void renderPass(Renderer r)
public void setPassState(RenderState state)
state
- state to enforcepublic RenderState getRenderState(int type)
getRenderState(com.jme.scene.state.RenderState.StateType)
instead.
type
- the renderstate type to retrieve
public RenderState getRenderState(RenderState.StateType type)
type
- the renderstate type to retrieve
public void clearPassState(int renderStateType)
clearPassState(com.jme.scene.state.RenderState.StateType)
instead.
renderStateType
- The type of RenderState to clear enforcement on.public void clearPassState(RenderState.StateType type)
type
- The type of RenderState to clear enforcement on.public void clearPassStates()
RenderContext.clearEnforcedState(int)
protected void applyPassStates()
protected abstract void doRender(Renderer r)
protected void resetOldStates()
public final void updatePass(float tpf)
protected void doUpdate(float tpf)
public void add(Spatial toAdd)
public Spatial get(int index)
public boolean contains(Spatial s)
public boolean remove(Spatial toRemove)
public void removeAll()
public int size()
public boolean isEnabled()
public void setEnabled(boolean enabled)
enabled
- The enabled to set.public float getZFactor()
public void setZFactor(float factor)
factor
- The zFactor to set.public float getZOffset()
public void setZOffset(float offset)
offset
- The zOffset to set.public void cleanUp()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |