SleakEngine 1.0.0
C++23 multi-backend game engine
Loading...
Searching...
No Matches
Sleak::Physics::TriangleMesh Struct Reference

#include <Colliders.hpp>

Public Member Functions

void Build (const float *positions, size_t count, size_t stride, const uint32_t *indexData, size_t indexCount)
 Copies vertex positions and indices out of raw mesh buffers and recomputes bounds.

Public Attributes

AABB bounds
std::vector< uint32_t > indices
std::vector< Vector3Dvertices

Detailed Description

Exact triangle-soup collision shape; heavier than the primitive shapes, used for static geometry.

Definition at line 204 of file Colliders.hpp.

Member Function Documentation

◆ Build()

void Sleak::Physics::TriangleMesh::Build ( const float * positions,
size_t count,
size_t stride,
const uint32_t * indexData,
size_t indexCount )
inline

Copies vertex positions and indices out of raw mesh buffers and recomputes bounds.

Definition at line 210 of file Colliders.hpp.

Member Data Documentation

◆ bounds

AABB Sleak::Physics::TriangleMesh::bounds

Definition at line 207 of file Colliders.hpp.

◆ indices

std::vector<uint32_t> Sleak::Physics::TriangleMesh::indices

Definition at line 206 of file Colliders.hpp.

◆ vertices

std::vector<Vector3D> Sleak::Physics::TriangleMesh::vertices

Definition at line 205 of file Colliders.hpp.