Package eu.iv4xr.framework.environments
Class W3DAgentState
java.lang.Object
nl.uu.cs.aplib.mainConcepts.SimpleState
nl.uu.cs.aplib.agents.State
eu.iv4xr.framework.mainConcepts.Iv4xrAgentState<Integer>
eu.iv4xr.framework.environments.W3DAgentState
Provide a subclass of
Iv4xrAgentState
that uses
SurfaceNavGraph
as
navigation graph. SurfaceNavGraph extends
SimpleNavGraph
. So, it can
also represent dynamic obstacles in the graph. Additionally, SurfaceNavGraph
also includes path finding, and importanty it can keep track of navigation
nodes that are seen so far, and use this to provide methods to do exploration
over the graph.
The class requires W3DEnvironment
as
an environment.
- Author:
- Wish
-
Field Summary
Fields inherited from class eu.iv4xr.framework.mainConcepts.Iv4xrAgentState
worldmodel, worldNavigation
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionenv()
Return theEnvironment
associated with the state.setEnvironment(W3DEnvironment env, float faceAreaThresholdToAddCenterNode)
Link the given environment to this State.setEnvironment(Environment env)
Link an environment to this state.Return the navigation-graph inIv4xrAgentState.worldNavigation
.Methods inherited from class eu.iv4xr.framework.mainConcepts.Iv4xrAgentState
loadSimpleNavGraph, loadSimpleNavGraph, loadSurfaceNavGraph, loadSurfaceNavGraph, setWorldNavigation, updateState, worldmodel
Methods inherited from class nl.uu.cs.aplib.agents.State
attachProlog, messenger, prolog
Methods inherited from class nl.uu.cs.aplib.mainConcepts.SimpleState
log, owner
-
Constructor Details
-
W3DAgentState
public W3DAgentState()
-
-
Method Details
-
setEnvironment
Link the given environment to this State. It will also import the mesh describing the navigable surface of the 3D world (this is supposed to have been loaded into env) and convert it into an instance of SurfaceNavGraph to facilitate navigation over this surface. For each face in the mesh, this constructor will also add the center-point of the face in the created navigation graph. This is done if the face's area is large enough; that is, if it exceeds the threshold faceAreaThresholdToAddCenterNode. -
setEnvironment
Link an environment to this state. An instance ofW3DEnvironment
is needed. The method will forward the call tosetEnvironment(W3DEnvironment, float)
, set with faceAreaThresholdToAddCenterNode set to 1.0.- Overrides:
setEnvironment
in classIv4xrAgentState<Integer>
- Parameters:
env
- The Environment we want to associate with this state.- Returns:
- The method simply returns this state to allow it to be used in the Fluent Interface style.
-
env
Description copied from class:SimpleState
Return theEnvironment
associated with the state.- Overrides:
env
in classIv4xrAgentState<Integer>