Enum Box2DUtils.PreconditionCheck

java.lang.Object
java.lang.Enum<Box2DUtils.PreconditionCheck>
net.dermetfan.gdx.physics.box2d.Box2DUtils.PreconditionCheck
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Box2DUtils.PreconditionCheck>, java.lang.constant.Constable
Enclosing class:
Box2DUtils

public static enum Box2DUtils.PreconditionCheck
extends java.lang.Enum<Box2DUtils.PreconditionCheck>
checks if Box2D's preconditions are met to avoid native crashes
Since:
0.11.0
  • Nested Class Summary

    Nested Classes
    Modifier and Type Class Description
    static class  Box2DUtils.PreconditionCheck.InvalidChainShapeException
    indicates that a ChainShape cannot be created from this polyline
    static class  Box2DUtils.PreconditionCheck.InvalidPolygonShapeException
    indicates that a PolygonShape cannot be created from this polygon
    static class  Box2DUtils.PreconditionCheck.InvalidPolyShapeException
    indicates that a poly shape cannot be created from these vertices

    Nested classes/interfaces inherited from class java.lang.Enum

    java.lang.Enum.EnumDesc<E extends java.lang.Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant Description
    EXCEPTION
    throws an exception
    NONE
    doesn't check anything
    SILENT
    checks preconditions normally
  • Method Summary

    Modifier and Type Method Description
    static void checkChainShape​(float[] vertices, int offset, int length)  
    static void checkPolygonShape​(float[] vertices, int offset, int length)  
    boolean isValidChainShape​(float[] vertices)  
    abstract boolean isValidChainShape​(float[] vertices, int offset, int length)  
    boolean isValidChainShape​(com.badlogic.gdx.utils.FloatArray vertices)  
    boolean isValidPolygonShape​(float[] vertices)  
    abstract boolean isValidPolygonShape​(float[] vertices, int offset, int length)  
    boolean isValidPolygonShape​(com.badlogic.gdx.utils.FloatArray vertices)  
    static Box2DUtils.PreconditionCheck valueOf​(java.lang.String name)
    Returns the enum constant of this type with the specified name.
    static Box2DUtils.PreconditionCheck[] values()
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Enum

    clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

  • Method Details

    • values

      public static Box2DUtils.PreconditionCheck[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static Box2DUtils.PreconditionCheck valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
      java.lang.NullPointerException - if the argument is null
    • checkChainShape

      public static void checkChainShape​(float[] vertices, int offset, int length)
    • checkPolygonShape

      public static void checkPolygonShape​(float[] vertices, int offset, int length)
    • isValidChainShape

      public boolean isValidChainShape​(com.badlogic.gdx.utils.FloatArray vertices)
    • isValidChainShape

      public boolean isValidChainShape​(float[] vertices)
    • isValidChainShape

      public abstract boolean isValidChainShape​(float[] vertices, int offset, int length)
    • isValidPolygonShape

      public boolean isValidPolygonShape​(com.badlogic.gdx.utils.FloatArray vertices)
    • isValidPolygonShape

      public boolean isValidPolygonShape​(float[] vertices)
    • isValidPolygonShape

      public abstract boolean isValidPolygonShape​(float[] vertices, int offset, int length)