Package rosequartz.gfx
Class DepthTestingManager
java.lang.Object
rosequartz.gfx.DepthTestingManager
Class for managing depth testing.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents one of the possible comparison modes for depth testing. -
Constructor Summary
ConstructorsConstructorDescriptionDepthTestingManager(NativesFX.DepthTestingManager nativeDepthTestingManager) -
Method Summary
Modifier and TypeMethodDescriptionstatic DepthTestingManagerget()Gets the depth-testing manager.Gets the current function used for depth testing.booleanGets if depth testing is enabled.setEnabled(boolean enabled)Enables / disables depth testing.setFunction(DepthTestingManager.TestingFunction function)Sets the function used for depth testing.
-
Constructor Details
-
DepthTestingManager
-
-
Method Details
-
get
Gets the depth-testing manager.- Returns:
- DepthTestingManager-object
- See Also:
DepthTestingManager
-
setEnabled
Enables / disables depth testing. Depth testing is disabled by default and - if enabled - checks if the currently drawn pixel is in front of old the pixel at that position before setting it. This makes sure that (for example) the back side of a cube is not drawn in front of the front side.- Parameters:
enabled- depth testing enabled- Returns:
- this
- Throws:
NotOnGraphicsThreadException
-
isEnabled
public boolean isEnabled()Gets if depth testing is enabled.- Returns:
- depth testing enabled
-
setFunction
public DepthTestingManager setFunction(DepthTestingManager.TestingFunction function) throws NotOnGraphicsThreadExceptionSets the function used for depth testing. The default is TestingFunction.LESS.
TestingFunction.NEVER will never draw,
TestingFunction.LESS will draw if the stored depth is less than the drawn depth,
TestingFunction.GREATER will draw if the stored depth is greater than the drawn depth,
TestingFunction.EQUAL will draw if the stored depth is equal to the drawn depth,
TestingFunction.ALWAYS will always draw,
TestingFunction.LESS_EQUAL will draw if the stored depth is less than or equal to the drawn depth,
TestingFunction.GREATER_EQUAL will draw if the stored depth is greater than or equal to the drawn depth,
TestingFunction.NOT_EQUAL will draw if the stored depth is not equal to the drawn depth.- Parameters:
function- comparison used for testing- Returns:
- this
- Throws:
NotOnGraphicsThreadException
-
getFunction
Gets the current function used for depth testing.- Returns:
- depth testing function
-