Package net.dermetfan.gdx.physics.box2d
Enum Class Box2DUtils.PreconditionCheck
java.lang.Object
java.lang.Enum<Box2DUtils.PreconditionCheck>
net.dermetfan.gdx.physics.box2d.Box2DUtils.PreconditionCheck
- All Implemented Interfaces:
Serializable,Comparable<Box2DUtils.PreconditionCheck>,Constable
- Enclosing class:
Box2DUtils
checks if Box2D's preconditions are met to avoid native crashes
- Since:
- 0.11.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classindicates that a ChainShape cannot be created from this polylinestatic classindicates that a PolygonShape cannot be created from this polygonstatic classindicates that a poly shape cannot be created from these verticesNested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheckChainShape(float[] vertices, int offset, int length) static voidcheckPolygonShape(float[] vertices, int offset, int length) booleanisValidChainShape(float[] vertices) abstract booleanisValidChainShape(float[] vertices, int offset, int length) booleanisValidChainShape(com.badlogic.gdx.utils.FloatArray vertices) booleanisValidPolygonShape(float[] vertices) abstract booleanisValidPolygonShape(float[] vertices, int offset, int length) booleanisValidPolygonShape(com.badlogic.gdx.utils.FloatArray vertices) static Box2DUtils.PreconditionCheckReturns the enum constant of this class with the specified name.static Box2DUtils.PreconditionCheck[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
doesn't check anything -
SILENT
checks preconditions normally -
EXCEPTION
throws an exception
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- 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)
-