|
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.SceneGraphObject
org.j3d.aviatrix3d.BufferState
org.j3d.aviatrix3d.AccumulationBufferState
public class AccumulationBufferState
Describes attributes used when interacting with the accumulation buffer.
Including this state class in the global setup automatically enables the accumulation buffer. It also has a slightly special status in that, unlike the other buffer types, the state is executed at the end of the rendering pass rather than at the beginning. That is because accumulation buffers are used to take the current colour buffer and copy it into the accumulation buffer using one of a set of functions (or copy the accumulation buffer back to the colour buffer in the case of GL_RETURN).
The default setup for this class is:
Internationalisation Resource Names
Field Summary | |
---|---|
static int |
FUNCTION_ACCUMULATE
Take the current buffer colours multiply them by value and then add with the accumulation buffer. |
static int |
FUNCTION_ADD
Add the value to the current accumulation buffer values. |
static int |
FUNCTION_LOAD
Replace the values in the accumulation buffer with the current colours |
static int |
FUNCTION_MULTIPLY
Multiply the contents of the current buffer by the value. |
Fields inherited from class org.j3d.aviatrix3d.BufferState |
---|
lastParent, liveCount, parentList |
Fields inherited from class org.j3d.aviatrix3d.SceneGraphObject |
---|
alive, LISTENER_SET_TIMING_ERR_PROP, updateHandler |
Fields inherited from interface org.j3d.aviatrix3d.rendering.BufferStateRenderable |
---|
ACCUMULATION_BUFFER, COLOR_BUFFER, DEPTH_BUFFER, GENERAL_BUFFER, STENCIL_BUFFER |
Constructor Summary | |
---|---|
AccumulationBufferState()
Constructs a state set with default values. |
Method Summary | |
---|---|
boolean |
checkClearBufferState()
Check to see if this buffer should be cleared at the start of this run. |
void |
clearBufferState(javax.media.opengl.GL gl)
Restore all state to the default values and copy the buffer to the colour buffer. |
int |
compareTo(AccumulationBufferState abs)
Compares this object with the specified object for order. |
int |
compareTo(java.lang.Object o)
Compares this object with the specified object for order. |
boolean |
equals(AccumulationBufferState abs)
Compares this object with the specified object to check for equivalence. |
boolean |
equals(java.lang.Object o)
Compare this object for equality to the given object. |
int |
getAccumFunction()
Get the current operation used when accumulating colour values. |
float |
getAlpha()
Get the current alpha channel clear value |
float |
getBlue()
Get the current blue channel clear value |
int |
getBufferBitMask()
Get the GL buffer bit flag that this state class represents. |
int |
getBufferType()
Get the type of buffer this state represents. |
float |
getGreen()
Get the current green channel clear value |
float |
getRed()
Get the current red channel clear value |
float |
getValue()
Get the value operand used with some of the function types. |
void |
setAccumFunction(int func)
Set the operation that should be performed when accumulating colour values into the accumulation buffer. |
void |
setBufferState(javax.media.opengl.GL gl)
Issue ogl commands needed for this buffer to set the initial state, including the initial enabling. |
void |
setClearBufferState(boolean clear)
Set the flag for whether the buffer state should be cleared when this state object is executed. |
void |
setClearColor(float red,
float green,
float blue,
float alpha)
Set the value that each of the colour channels should be cleared to. |
void |
setValue(float val)
Set the value that accompanies some of the operation types. |
void |
updateBufferState(javax.media.opengl.GL gl)
Issue ogl commands needed for this component to change the state, assuming that it is already enabled. |
Methods inherited from class org.j3d.aviatrix3d.BufferState |
---|
addParent, getParents, numParents, removeParent |
Methods inherited from class org.j3d.aviatrix3d.SceneGraphObject |
---|
checkForCyclicChild, checkForCyclicParent, dataChanged, getAppUpdateWriteTimingMessage, getBoundsWriteTimingMessage, getDataWriteTimingMessage, getUserData, isLive, setLive, setUpdateHandler, setUserData |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int FUNCTION_ACCUMULATE
public static final int FUNCTION_LOAD
public static final int FUNCTION_ADD
public static final int FUNCTION_MULTIPLY
Constructor Detail |
---|
public AccumulationBufferState()
Method Detail |
---|
public int getBufferType()
getBufferType
in interface BufferStateRenderable
public int getBufferBitMask()
getBufferBitMask
in interface BufferStateRenderable
public boolean checkClearBufferState()
checkClearBufferState
in interface BufferStateRenderable
public void setBufferState(javax.media.opengl.GL gl)
setBufferState
in interface BufferStateRenderable
gl
- The gl context to draw withpublic void updateBufferState(javax.media.opengl.GL gl)
updateBufferState
in interface BufferStateRenderable
gl
- The gl context to draw withpublic void clearBufferState(javax.media.opengl.GL gl)
clearBufferState
in interface BufferStateRenderable
gl
- The gl context to draw withpublic int compareTo(java.lang.Object o) throws java.lang.ClassCastException
compareTo
in interface java.lang.Comparable
o
- The objec to be compared
java.lang.ClassCastException
- The specified object's type prevents it from
being compared to this Objectpublic boolean equals(java.lang.Object o)
equals
in interface Renderable
equals
in class java.lang.Object
o
- The object to be compared
public void setClearBufferState(boolean clear) throws InvalidWriteTimingException
clear
- True if the buffer should be cleared when this is the first
state to be used in the current operation
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener data update callback methodpublic void setAccumFunction(int func) throws java.lang.IllegalArgumentException, InvalidWriteTimingException
func
- One of the FUNCTION_ constants
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener data update callback method
java.lang.IllegalArgumentException
- The operation value was not one of the
valid types.public int getAccumFunction()
public void setValue(float val) throws java.lang.IllegalArgumentException, InvalidWriteTimingException
val
- An arbitrary value defined by the user
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener data update callback method
java.lang.IllegalArgumentException
public float getValue()
public void setClearColor(float red, float green, float blue, float alpha) throws InvalidWriteTimingException
red
- The red channel clear valuegreen
- The green channel clear valueblue
- The blue channel clear valuealpha
- The alpha channel clear value
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener data update callback methodpublic float getRed()
public float getGreen()
public float getBlue()
public float getAlpha()
public int compareTo(AccumulationBufferState abs)
abs
- The attributes instance to be comabsred
public boolean equals(AccumulationBufferState abs)
abs
- The attributes instance to be compared
|
Aviatrix3D 2.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |