Class CreatureController
java.lang.Object
com.marginallyclever.ro3.node.Node
com.marginallyclever.ro3.node.nodes.pose.Pose
com.marginallyclever.ro3.node.nodes.odenode.ODENode
com.marginallyclever.ro3.node.nodes.odenode.CreatureController
- All Implemented Interfaces:
PoseChangeListener
,CollisionListener
,EventListener
A controller for a creature made of ODE4J hinges and bodies.
This controller registers itself to receive collision events from the physics world.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetBrain()
void
getComponents
(List<JPanel> list) Build a Swing Component that represents this Node.void
onCollision
(org.ode4j.ode.DGeom g1, org.ode4j.ode.DGeom g2, org.ode4j.ode.DContact contact) Called when two objects collide.void
update
(double dt) Called every frame.Methods inherited from class com.marginallyclever.ro3.node.nodes.pose.Pose
addPoseChangeListener, getIcon, getLocal, getParentPose, getPosition, getRotationEuler, getRotationIndex, getWorld, onPoseChange, removePoseChangeListener, setLocal, setPosition, setRotationEuler, setRotationIndex, setWorld, toJSON
Methods inherited from class com.marginallyclever.ro3.node.Node
addAttachListener, addChild, addChild, addDetachListener, addReadyListener, addRenameListener, findByPath, findChild, findChild, findFirstChild, findFirstSibling, findNodeByID, findParent, findParent, getAbsolutePath, getChildren, getName, getParent, getRootNode, getUniqueID, hasParent, isNameUsedBySibling, removeAttachListener, removeChild, removeDetachListener, removeReadyListener, removeRenameListener, setName, witnessProtection
-
Constructor Details
-
CreatureController
public CreatureController() -
CreatureController
-
-
Method Details
-
getComponents
Description copied from class:Pose
Build a Swing Component that represents this Node.- Overrides:
getComponents
in classPose
- 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 interfaceCollisionListener
- Parameters:
g1
- The first objectg2
- The second objectcontact
- The contact information
-
update
public void update(double dt) Description copied from class:Node
Called every frame. -
getHinges
-
getBodies
-
getBrain
-