Class ConvexHullColliderExtensions
Helpers to build Bepu ConvexHullCollider instances from Stride procedural meshes.
public static class ConvexHullColliderExtensions
- Inheritance
-
ConvexHullColliderExtensions
Methods
ToConvexHullCollider(GeometricMeshData<VertexPositionNormalTexture>)
Builds a ConvexHullCollider from the raw mesh data.
public static ConvexHullCollider ToConvexHullCollider(this GeometricMeshData<VertexPositionNormalTexture> meshData)
Parameters
meshDataGeometricMeshData<VertexPositionNormalTexture>The mesh whose vertices define the hull.
Returns
- ConvexHullCollider
A collider wrapping a freshly built hull.
Remarks
Each call produces a new DecomposedHulls, and Stride keys its cache of built Bepu hulls on that instance, so calling this once per body builds one Bepu hull per body. Share a single DecomposedHulls instead when many bodies use the same shape - see SharedHullCache.
ToDecomposedHulls(GeometricMeshData<VertexPositionNormalTexture>)
Extracts the hull data from the raw mesh data, without wrapping it in a collider.
public static DecomposedHulls ToDecomposedHulls(this GeometricMeshData<VertexPositionNormalTexture> meshData)
Parameters
meshDataGeometricMeshData<VertexPositionNormalTexture>The mesh whose vertices define the hull.
Returns
- DecomposedHulls
The hull data, suitable for sharing across many colliders.
Remarks
Useful when the same shape is used by many bodies: build the data once and assign the same instance to every Hull, so Stride builds and stores exactly one Bepu hull for all of them.