java.lang.Object
com.j3d.engine.scene.draw.RenderState<P,G>
- Type Parameters:
P- The type of the pure geometric object, extendingPure.G- The type of the graphics object, extendingGObject.
- All Implemented Interfaces:
Drawable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final UUIDprivate Consumer<Graphics2D> private Consumer<Graphics2D> private final GThe graphical object instance that this render state belongs to.private final PThe pure geometric definition associated with this render state.private booleanWhether this render state is valid or not. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddraw(Graphics2D graphics2D) Draws this geometry to the screen.voiddrawSelected(Graphics2D graphics2D) Draws this geometry to the screen, but in a selected state.getId()getPivot()getPure()voidMarks this render state as invalid.booleanisValid()Checks if this render state is currently valid.voidsetConsumers(Consumer<Graphics2D> onDraw, Consumer<Graphics2D> onDrawSelected)
-
Field Details
-
parent
-
pure
-
id
-
valid
private boolean validWhether this render state is valid or not. -
onDraw
-
onDrawSelected
-
-
Constructor Details
-
RenderState
-
-
Method Details
-
invalidate
public void invalidate()Marks this render state as invalid. An invalid render state typically means it should no longer be used or rendered. -
isValid
public boolean isValid()Checks if this render state is currently valid. An invalid render state typically means it should no longer be used or rendered.- Returns:
trueif the render state is valid,falseotherwise.
-
getParent
-
getPure
-
getId
-
setConsumers
-
draw
Description copied from interface:DrawableDraws this geometry to the screen. -
drawSelected
Description copied from interface:DrawableDraws this geometry to the screen, but in a selected state.- Specified by:
drawSelectedin interfaceDrawable- Parameters:
graphics2D- The Graphics2D instance
-
getPivot
-