group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
physics::WorldBrush Struct Reference

A convex volume defined by bounding planes (for ramps, angled walls, etc.). More...

#include <SweptCollision.hpp>

Collaboration diagram for physics::WorldBrush:
[legend]

Public Attributes

Plane planes [k_maxPlanes]
int planeCount {0}

Static Public Attributes

static constexpr int k_maxPlanes = 64

Detailed Description

A convex volume defined by bounding planes (for ramps, angled walls, etc.).

The solid interior is the intersection of all half-spaces: dot(normal, p) < distance. Normals point outward (into free space), same as the Plane convention.

k_maxPlanes is sized to fit the typical output of V-HACD convex decomposition: each output hull has up to ~64 vertices (the V-HACD m_maxNumVerticesPerCH parameter we pass), and a triangulated convex polytope's face-plane count is bounded by ~2V-4 for V vertices but in practice (after coplanar-triangle deduplication) much lower. 64 planes is comfortable headroom and keeps each WorldBrush at 1KB — well within L1 cache for the per-frame collision loop.

Member Data Documentation

◆ k_maxPlanes

int physics::WorldBrush::k_maxPlanes = 64
staticconstexpr

◆ planeCount

int physics::WorldBrush::planeCount {0}

◆ planes

Plane physics::WorldBrush::planes[k_maxPlanes]

The documentation for this struct was generated from the following file: