Engine → Physics
collision_mesh_asset.h
Triangle geometry for mesh and convex colliders. Values are validated on construction: every index is in range, the index count is a multiple of three and degenerate triangles are dropped.
Structs
| File |
Description |
convex_hull_outline |
The outline of a convex hull: its corners in the mesh's space and the edges of its faces, each once, as two indices into the corners (the lower first, sorted). |
Classes
| File |
Description |
collision_mesh_asset |
Triangle geometry for mesh and convex colliders. Values are validated on construction: every index is in range, the index count is a multiple of three and degenerate triangles are dropped. |
Forward Declarations
detail::collision_mesh_shapes
struct collision_mesh_shapes;
The Jolt shapes built for a loaded mesh. Opaque here: Jolt never reaches a public header.
Constants
| Name |
Type |
Value |
Description |
COLLISION_MESH_ASSET_TYPE |
inline constexpr std::string_view |
"conjure.physics.collision_mesh" |
Registered asset type name. |
COLLISION_MESH_IMPORTER_ID |
inline constexpr std::string_view |
"conjure.physics.collision_mesh_importer" |
Importer id recorded in .meta files. |
COLLISION_MESH_SECTION_ALIGNMENT |
inline constexpr usize |
16 |
Byte alignment of every section of the cooked payload. |
Macros
CONJURE_DECLARE_ASSET_TYPE
CONJURE_DECLARE_ASSET_TYPE(conjure::physics::collision_mesh_asset, "conjure.physics.collision_mesh")
Functions
Public
outline_convex_hull
The outline of the hull a convex_collider of mesh with convexRadius collides with, built as the physics world builds it (a negative radius counts as 0, as there): the hull of the mesh's points, its coplanar triangles merged into one face, a point inside it left out. For an editor's picture of the collider; it builds a hull each call. SHAPE_CREATE_FAILED with Jolt's message for points that make no hull (in one plane, too few).