All Implemented Interfaces:
PoseChangeListener, EventListener

public class ODECylinder extends ODEBody
Wrapper for a ODE4J cylinder.
  • Constructor Details

    • ODECylinder

      public ODECylinder()
    • ODECylinder

      public ODECylinder(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 ODEBody
      Parameters:
      list - the list to add components to.
    • getRadius

      public double getRadius()
    • getLength

      public double getLength()
    • setRadius

      public void setRadius(double radius)
    • setLength

      public void setLength(double length)
    • 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 ODEBody
      Returns:
      the JSON object.
    • fromJSON

      public void fromJSON(org.json.JSONObject json)
      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 ODEBody
      Parameters:
      json - the JSON object to read from.