public class Capsule extends ProceduralMesh

Capsule is a Mesh. It is a cylinder with rounded ends.

  • Field Details

    • RESOLUTION_CIRCULAR

      public static final int RESOLUTION_CIRCULAR
      See Also:
    • RESOLUTION_LENGTH

      public static final int RESOLUTION_LENGTH
      See Also:
    • RESOLUTION_DOME

      public static final int RESOLUTION_DOME
      See Also:
    • radius

      public float radius
    • height

      public float height
  • Constructor Details

    • Capsule

      public Capsule()
    • Capsule

      public Capsule(double height, double radius)
  • Method Details

    • getEnglishName

      public String getEnglishName()
      Specified by:
      getEnglishName in class ProceduralMesh
    • updateModel

      public void updateModel()
      Description copied from class: ProceduralMesh
      Procedurally generate a list of triangles and update the bounding box.
      Specified by:
      updateModel in class ProceduralMesh
    • toJSON

      public org.json.JSONObject toJSON()
      Overrides:
      toJSON in class ProceduralMesh
    • fromJSON

      public void fromJSON(org.json.JSONObject jo)
      Overrides:
      fromJSON in class ProceduralMesh
    • setLength

      public void setLength(double length)
      Sets the length of the cylinder. does not update the mesh.
      Parameters:
      length -
    • setRadius

      public void setRadius(double radius)
      Sets the radius of the cylinder. does not update the mesh.
      Parameters:
      radius -