Class TriangleShapeSettings

All Implemented Interfaces:
ConstConvexShapeSettings, ConstJoltPhysicsObject, ConstShapeSettings, RefTarget, AutoCloseable, Comparable<JoltPhysicsObject>

public class TriangleShapeSettings extends ConvexShapeSettings
Settings used to construct a TriangleShape.
  • Constructor Details

    • TriangleShapeSettings

      public TriangleShapeSettings(Vec3Arg v1, Vec3Arg v2, Vec3Arg v3)
      Instantiate settings for the specified vertices.
      Parameters:
      v1 - the location of the first vertex (not null, unaffected)
      v2 - the location of the 2nd vertex (not null, unaffected)
      v3 - the location of the 3rd vertex (not null, unaffected)
    • TriangleShapeSettings

      public TriangleShapeSettings(Vec3Arg v1, Vec3Arg v2, Vec3Arg v3, float convexRadius)
      Instantiate settings for the specified vertices.
      Parameters:
      v1 - the location of the first vertex (not null, unaffected)
      v2 - the location of the 2nd vertex (not null, unaffected)
      v3 - the location of the 3rd vertex (not null, unaffected)
      convexRadius - the desired convex radius (default=0)
    • TriangleShapeSettings

      public TriangleShapeSettings(Vec3Arg v1, Vec3Arg v2, Vec3Arg v3, float convexRadius, PhysicsMaterial material)
      Instantiate settings for the specified vertices.
      Parameters:
      v1 - the location of the first vertex (not null, unaffected)
      v2 - the location of the 2nd vertex (not null, unaffected)
      v3 - the location of the 3rd vertex (not null, unaffected)
      convexRadius - the desired convex radius (default=0)
      material - the desired surface properties (not null, unaffected) or null for default properties (default=null)
  • Method Details

    • getConvexRadius

      public float getConvexRadius()
      Return the convex radius. The settings are unaffected. (native attribute: mConvexRadius)
      Returns:
      the convex radius (≥0)
    • setConvexRadius

      public void setConvexRadius(float radius)
      Alter the convex radius. (native attribute: mConvexRadius)
      Parameters:
      radius - the desired convex radius (≥0)