Class ODENode
java.lang.Object
com.marginallyclever.ro3.node.Node
com.marginallyclever.ro3.node.nodes.pose.Pose
com.marginallyclever.ro3.node.nodes.odenode.ODENode
- All Implemented Interfaces:
PoseChangeListener
,EventListener
- Direct Known Subclasses:
CreatureController
,ODEBody
,ODEJoint
,ODEPlane
Base class for all Node
that implement ODE4J.
ODE Nodes like ODEHinge
need to be able to find the subject nodes to which the hinge connects. These
subjects are not guaranteed to exist during load. They *are* guaranteed at the first call to update(double)
after loading.
This class is responsible for calling onFirstUpdate()
once at the start of the first
update(double)
. No physics calculations should be done in the constructor or in onAttach()
.
the flag to run onFirstUpdate()
again will be reset if:
- the node is detached
- the node is deserialized
-
Constructor Summary
-
Method Summary
Methods inherited from class com.marginallyclever.ro3.node.nodes.pose.Pose
addPoseChangeListener, getComponents, 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
-
ODENode
public ODENode() -
ODENode
-
-
Method Details
-
update
public void update(double dt) Description copied from class:Node
Called every frame. -
fromJSON
public void fromJSON(org.json.JSONObject from) Description copied from class:Node
Deserialize this node and its children from a JSON object and its children. Classes that override this method should call super.fromJSON(). When they do it will trigger the creation of child nodes. The child nodes will then call their own fromJSON() methods.
-