public abstract class StateActionRenderLayer extends java.lang.Object implements RenderLayer
State
and AbstractGroundedAction
to render. Subclasses need to implement the
renderStateAction(java.awt.Graphics2D, burlap.oomdp.core.states.State, burlap.oomdp.core.AbstractGroundedAction, float, float)
method.Modifier and Type | Field and Description |
---|---|
protected AbstractGroundedAction |
renderAction
The current
AbstractGroundedAction to render |
protected State |
renderState
The current
State to render |
Constructor and Description |
---|
StateActionRenderLayer() |
Modifier and Type | Method and Description |
---|---|
void |
clearRenderedStateAction()
Sets the
State and AbstractGroundedAction to
render to null, which will prevent calls to the method renderStateAction(java.awt.Graphics2D, burlap.oomdp.core.states.State, burlap.oomdp.core.AbstractGroundedAction, float, float)
to be made. |
AbstractGroundedAction |
getRenderAction()
Returns the
AbstractGroundedAction that is/will be rendered |
State |
getRenderState()
Returns the
State that is/will be rendered |
void |
render(java.awt.Graphics2D g2,
float width,
float height) |
abstract void |
renderStateAction(java.awt.Graphics2D g2,
State s,
AbstractGroundedAction a,
float width,
float height)
Method to be implemented by subclasses that will render the input state-action to the given graphics context.
|
void |
updateRenderedStateAction(State s,
AbstractGroundedAction a)
Updates the
State and AbstractGroundedAction that will
be rendered the next time this class draws |
protected AbstractGroundedAction renderAction
AbstractGroundedAction
to renderpublic State getRenderState()
State
that is/will be renderedState
public AbstractGroundedAction getRenderAction()
AbstractGroundedAction
that is/will be renderedAbstractGroundedAction
public void updateRenderedStateAction(State s, AbstractGroundedAction a)
State
and AbstractGroundedAction
that will
be rendered the next time this class drawss
- a State
to rendera
- a AbstractGroundedAction
to renderpublic void clearRenderedStateAction()
State
and AbstractGroundedAction
to
render to null, which will prevent calls to the method renderStateAction(java.awt.Graphics2D, burlap.oomdp.core.states.State, burlap.oomdp.core.AbstractGroundedAction, float, float)
to be made.public void render(java.awt.Graphics2D g2, float width, float height)
render
in interface RenderLayer
public abstract void renderStateAction(java.awt.Graphics2D g2, State s, AbstractGroundedAction a, float width, float height)
g2
- the Graphics2D
to which to renders
- the State
to rendera
- the AbstractGroundedAction
to renderwidth
- the width of the graphics contextheight
- the height of hte graphics context