All Implemented Interfaces:
PoseChangeListener, CollisionListener, EventListener

public class CreatureController extends ODENode implements CollisionListener

A controller for a creature made of ODE4J hinges and bodies.

This controller registers itself to receive collision events from the physics world.

  • Constructor Details

    • CreatureController

      public CreatureController()
    • CreatureController

      public CreatureController(String name)
  • Method Details

    • getComponents

      public void getComponents(List<JPanel> list)
      Description copied from class: Pose
      Build a Swing Component that represents this Node.
      Overrides:
      getComponents in class Pose
      Parameters:
      list - the list to add components to.
    • onCollision

      public void onCollision(org.ode4j.ode.DGeom g1, org.ode4j.ode.DGeom g2, org.ode4j.ode.DContact contact)
      Description copied from interface: CollisionListener
      Called when two objects collide.
      Specified by:
      onCollision in interface CollisionListener
      Parameters:
      g1 - The first object
      g2 - The second object
      contact - The contact information
    • update

      public void update(double dt)
      Description copied from class: Node
      Called every frame.
      Overrides:
      update in class ODENode
      Parameters:
      dt - the time since the last frame.
    • getHinges

      public List<ODEHinge> getHinges()
    • getBodies

      public List<ODEBody> getBodies()
    • getBrain

      public BrainManager getBrain()