Nudge Physics
A single file, header-only 3D physics library
Loading...
Searching...
No Matches
nudge::BodyLayout Struct Reference

Per-body struct that contains the indices of the body colliders inside ColliderData::boxes and ColliderData::spheres. More...

#include <nudge.h>

Public Attributes

uint16_t num_boxes
 
int16_t first_box_index
 
uint16_t num_spheres
 
int16_t first_sphere_index
 

Detailed Description

Per-body struct that contains the indices of the body colliders inside ColliderData::boxes and ColliderData::spheres.

Note
It's also possible to retrieve the body index from c->colliders using the bodyId field inside each collider's Transform

Member Data Documentation

◆ num_boxes

uint16_t nudge::BodyLayout::num_boxes

the number of box colliders this body owns

◆ first_box_index

int16_t nudge::BodyLayout::first_box_index

the index of the first box collider in ColliderData::boxes (box colliders are assumed to be contiguous, with no fragmentation), or -1

◆ num_spheres

uint16_t nudge::BodyLayout::num_spheres

the number of sphere colliders this body owns

◆ first_sphere_index

int16_t nudge::BodyLayout::first_sphere_index

the index of the first sphere collider in ColliderData::spheres (sphere colliders are assumed to be contiguous, with no fragmentation), or -1


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