ConvexMesh

data class ConvexMesh(val vertices: List<DVec3>, val indices: List<IVec3>, val margin: Double = DEFAULT_MARGIN) : Geometry

A shape assumed to be already convex, defined by an array of vertices and array of triangle face indices. If the shape is not convex, collision detection will not be accurate. Building a Shape out of this is faster than making one out of a ConvexHull, but is not as safe.

If you are taking input from a file or other unverified source, consider using a ConvexHull instead.

Parameters

vertices

The vertex buffer of the mesh.

indices

The indices buffer, determining which faces are made up of which vertices.

margin

The convex margin of the shape. See ConvexGeometry.

Constructors

Link copied to clipboard
constructor(vertices: List<DVec3>, indices: List<IVec3>, margin: Double = DEFAULT_MARGIN)

Properties

Link copied to clipboard
val indices: List<IVec3>
Link copied to clipboard
Link copied to clipboard
val vertices: List<DVec3>