|
Aviatrix3D 2.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.j3d.aviatrix3d.SceneGraphObject org.j3d.aviatrix3d.NodeComponent org.j3d.aviatrix3d.DepthAttributes
public class DepthAttributes
Describes attributes used when interacting with the depth buffer on a per-object level.
The default setup for this class is:
Internationalisation Resource Names
Field Summary | |
---|---|
static int |
FUNCTION_ALWAYS
Comparison function that always passes. |
static int |
FUNCTION_EQUAL
Comparison function that passes if current depth == range. |
static int |
FUNCTION_GREATER
Comparison function that passes if current depth > range. |
static int |
FUNCTION_GREATER_OR_EQUAL
Comparison function that passes if current depth >= range. |
static int |
FUNCTION_LESS
Comparison function that passes if current depth < range. |
static int |
FUNCTION_LESS_OR_EQUAL
Comparison function that passes if current depth <= range. |
static int |
FUNCTION_NEVER
Comparison function that always fails. |
static int |
FUNCTION_NOTEQUAL
Comparison function that passes if current depth is not equal range. |
Fields inherited from class org.j3d.aviatrix3d.NodeComponent |
---|
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.AppearanceAttributeRenderable |
---|
ALPHA_ATTRIBUTE, BLEND_ATTRIBUTE, DEPTH_ATTRIBUTE, LINE_ATTRIBUTE, POINT_ATTRIBUTE, POLYGON_ATTRIBUTE, STENCIL_ATTRIBUTE |
Constructor Summary | |
---|---|
DepthAttributes()
Constructs a state set with default values. |
Method Summary | |
---|---|
int |
compareTo(DepthAttributes da)
Compares this object with the specified object for order. |
int |
compareTo(java.lang.Object o)
Compares this object with the specified object for order. |
void |
enableDepthTest(boolean test)
Set the flag for whether the depth testing should be enabled or disabled. |
void |
enableDepthWrite(boolean write)
Set the flag for whether the depth writing should be enabled or disabled. |
boolean |
equals(DepthAttributes da)
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 |
getAttributeType()
Get the type this visual attribute represents. |
int |
getDepthFunction()
Get the current operation used when the depth tests pass. |
float |
getMaxRange()
Get the current minimum depth range |
float |
getMinRange()
Get the current minimum depth range |
boolean |
isDepthTestEnabled()
Check to see if depth testing is currently enabled. |
boolean |
isDepthWriteEnabled()
Check to see if depth writing is currently enabled. |
void |
postRender(javax.media.opengl.GL gl)
Restore all openGL state to the given drawable. |
void |
render(javax.media.opengl.GL gl)
Issue ogl commands needed for this component |
void |
setDepthFunction(int func)
Set the operation that should be performed if the depth tests pass. |
void |
setMaxRange(float depth)
Set maximum depth value that is acceptable to be rendered. |
void |
setMinRange(float depth)
Set minimum depth value that is acceptable to be rendered. |
Methods inherited from class org.j3d.aviatrix3d.NodeComponent |
---|
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_NEVER
public static final int FUNCTION_LESS
public static final int FUNCTION_LESS_OR_EQUAL
public static final int FUNCTION_GREATER
public static final int FUNCTION_GREATER_OR_EQUAL
public static final int FUNCTION_EQUAL
public static final int FUNCTION_NOTEQUAL
public static final int FUNCTION_ALWAYS
Constructor Detail |
---|
public DepthAttributes()
Method Detail |
---|
public int getAttributeType()
getAttributeType
in interface AppearanceAttributeRenderable
public void render(javax.media.opengl.GL gl)
render
in interface ObjectRenderable
gl
- The gl context to draw withpublic void postRender(javax.media.opengl.GL gl)
postRender
in interface ObjectRenderable
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 enableDepthTest(boolean test) throws InvalidWriteTimingException
test
- True if testing should be enabled
state to be used in the current operation
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener data changed callback methodpublic boolean isDepthTestEnabled()
public void enableDepthWrite(boolean write) throws InvalidWriteTimingException
write
- True if writing should be enabled
state to be used in the current operation
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener data changed callback methodpublic boolean isDepthWriteEnabled()
public void setMinRange(float depth) throws java.lang.IllegalArgumentException, InvalidWriteTimingException
depth
- A distance between 0 and 1
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener data changed callback method
java.lang.IllegalArgumentException
- The value provided was out of rangepublic float getMinRange()
public void setMaxRange(float depth) throws java.lang.IllegalArgumentException, InvalidWriteTimingException
depth
- A distance between 0 and 1
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener data changed callback method
java.lang.IllegalArgumentException
- The value provided was out of rangepublic float getMaxRange()
public void setDepthFunction(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 changed callback method
java.lang.IllegalArgumentException
- The operation value was not one of the
valid types.public int getDepthFunction()
public int compareTo(DepthAttributes da)
da
- The attributes instance to be compared
public boolean equals(DepthAttributes da)
da
- 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 |