Class Pose
java.lang.Object
com.marginallyclever.ro3.node.Node
com.marginallyclever.ro3.node.nodes.pose.Pose
- Direct Known Subclasses:
AttachmentPoint
,Camera
,Limb
,LookAt
,MeshInstance
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
fromJSON
(org.json.JSONObject from) Deserialize this node and its children from a JSON object and its children.void
getComponents
(List<JPanel> list) Build a Swing Component that represents this Node.javax.vecmath.Matrix4d
getLocal()
javax.vecmath.Vector3d
javax.vecmath.Vector3d
getRotationEuler
(MatrixHelper.EulerSequence orderOfRotation) javax.vecmath.Matrix4d
getWorld()
void
setLocal
(javax.vecmath.Matrix4d m) void
setPosition
(javax.vecmath.Vector3d p) set the local position of this pose.void
setRotationEuler
(javax.vecmath.Vector3d r, MatrixHelper.EulerSequence orderOfRotation) Set the rotation of this pose using Euler angles.void
setRotationIndex
(MatrixHelper.EulerSequence rotationIndex) void
setWorld
(javax.vecmath.Matrix4d world) org.json.JSONObject
toJSON()
Serialize this node and its children to a JSON object and its children.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, update, witnessProtection
-
Constructor Details
-
Pose
public Pose() -
Pose
-
-
Method Details
-
getLocal
public javax.vecmath.Matrix4d getLocal() -
setLocal
public void setLocal(javax.vecmath.Matrix4d m) -
getWorld
public javax.vecmath.Matrix4d getWorld() -
setWorld
public void setWorld(javax.vecmath.Matrix4d world) -
getComponents
Build a Swing Component that represents this Node.- Overrides:
getComponents
in classNode
- Parameters:
list
- the list to add components to.
-
getRotationEuler
- Returns:
- the rotation of this pose using Euler angles in degrees.
-
setRotationEuler
Set the rotation of this pose using Euler angles.- Parameters:
r
- Euler angles in degrees.orderOfRotation
- the order of rotation.
-
getPosition
public javax.vecmath.Vector3d getPosition()- Returns:
- the local position of this pose.
-
setPosition
public void setPosition(javax.vecmath.Vector3d p) set the local position of this pose.- Parameters:
p
- the new position.
-
toJSON
public org.json.JSONObject toJSON()Description copied from class:Node
Serialize this node and its children to a JSON object and its children. Classes that override this method should call super.toJSON() first, then add to the object returned. -
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. -
getRotationIndex
-
setRotationIndex
-