Class W3DAgentState


public class W3DAgentState extends Iv4xrAgentState<Integer>
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
  • Constructor Details

    • W3DAgentState

      public W3DAgentState()
  • Method Details

    • worldNavigation

      public SurfaceNavGraph worldNavigation()
      Description copied from class: Iv4xrAgentState
      Return the navigation-graph in Iv4xrAgentState.worldNavigation.
      Overrides:
      worldNavigation in class Iv4xrAgentState<Integer>
    • setEnvironment

      public W3DAgentState setEnvironment(W3DEnvironment env, float faceAreaThresholdToAddCenterNode)
      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

      public W3DAgentState setEnvironment(Environment env)
      Link an environment to this state. An instance of W3DEnvironment is needed. The method will forward the call to setEnvironment(W3DEnvironment, float), set with faceAreaThresholdToAddCenterNode set to 1.0.
      Overrides:
      setEnvironment in class Iv4xrAgentState<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

      public W3DEnvironment env()
      Description copied from class: SimpleState
      Return the Environment associated with the state.
      Overrides:
      env in class Iv4xrAgentState<Integer>