java.lang.Object
com.marginallyclever.ro3.node.Node
com.marginallyclever.ro3.node.nodes.pose.Pose
Direct Known Subclasses:
AttachmentPoint, Camera, Limb, LookAt, MeshInstance

public class Pose extends Node

A Pose is a Node that has a position and rotation in space.

  • Constructor Details

    • Pose

      public Pose()
    • Pose

      public Pose(String name)
  • 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

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

      public javax.vecmath.Vector3d getRotationEuler(MatrixHelper.EulerSequence orderOfRotation)
      Returns:
      the rotation of this pose using Euler angles in degrees.
    • setRotationEuler

      public void setRotationEuler(javax.vecmath.Vector3d r, MatrixHelper.EulerSequence orderOfRotation)
      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.
      Overrides:
      toJSON in class Node
      Returns:
      the JSON object.
    • 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.
      Overrides:
      fromJSON in class Node
      Parameters:
      from - the JSON object to read from.
    • getRotationIndex

      public MatrixHelper.EulerSequence getRotationIndex()
    • setRotationIndex

      public void setRotationIndex(MatrixHelper.EulerSequence rotationIndex)