public final class DebugShapeFactory
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
highResolution
specify high-resolution debug meshes for convex shapes (up to 256
vertices) and zero-margin debug meshes for concave shapes
|
static int |
highResolution2
specify high-resolution debug meshes for convex shapes (up to 256
vertices) and actual-margin debug meshes for concave shapes
|
static java.util.logging.Logger |
logger
message logger for this class
|
static int |
lowResolution
specify low-res debug meshes for convex shapes (up to 42 vertices) and
zero-margin debug meshes for concave shapes
|
| Modifier and Type | Method and Description |
|---|---|
static java.nio.FloatBuffer |
debugVertices(CollisionShape shape,
int meshResolution)
Determine vertex locations for the specified collision shape.
|
static java.nio.FloatBuffer |
getDebugTriangles(CollisionShape shape,
int meshResolution)
Generate vertex locations for triangles to visualize the specified
collision shape.
|
static float |
maxDistance(CollisionShape shape,
Transform shapeToWorld,
int meshResolution)
Estimate how far the specified (non-compound, non-plane) shape extends
from some origin, based on its debug mesh.
|
static float |
volumeConvex(ConvexShape shape,
int meshResolution)
Calculate the volume of a debug mesh for the specified convex shape.
|
public static final int highResolution
public static final int highResolution2
public static final int lowResolution
public static final java.util.logging.Logger logger
public static java.nio.FloatBuffer debugVertices(CollisionShape shape, int meshResolution)
shape - the input shape (not null, unaffected)meshResolution - 0→low, 1→high for convex shapes,
2→high for all shapespublic static java.nio.FloatBuffer getDebugTriangles(CollisionShape shape, int meshResolution)
shape - the shape to visualize (not null, unaffected)meshResolution - 0→low, 1→high for convex shapes,
2→high for all shapespublic static float maxDistance(CollisionShape shape, Transform shapeToWorld, int meshResolution)
shape - (not null, not compound, not plane, unaffected)shapeToWorld - the transform to apply to debug-mesh coordinates (not
null, unaffected)meshResolution - 0→low, 1→high for convex shapes,
2→high for all shapespublic static float volumeConvex(ConvexShape shape, int meshResolution)
shape - the convex shape to analyze (not null, unaffected)meshResolution - 0→low, 1→high for convex shapes,
2→high for all shapes