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

This struct is used to access all the colliders in the physic world. More...

#include <nudge.h>

Public Attributes

struct { 
 
   uint16_t *   tags 
 
   BoxCollider *   data 
 
   Transform *   transforms 
 
   uint32_t   count 
 
boxes 
 
struct { 
 
   uint16_t *   tags 
 
   SphereCollider *   data 
 
   Transform *   transforms 
 
   uint32_t   count 
 
spheres 
 

Detailed Description

This struct is used to access all the colliders in the physic world.

Note
Colliders are shuffled in their two arrays, so it's not safe to store indices (but colliders relative to a single body are kept contiguos in their two arrays). Every collider has an (automatic) unique tag to reference it.

Member Data Documentation

◆ tags

uint16_t* nudge::ColliderData::tags

array of the collider unique identifiers of size count (do not touch)

◆ data [1/2]

BoxCollider* nudge::ColliderData::data

array of BoxCollider structs of size count

◆ transforms

Transform* nudge::ColliderData::transforms

array of Transform structs of size count, also used to get the body this collider belongs to

◆ count

uint32_t nudge::ColliderData::count

the number of box colliders

the number of sphere colliders

◆ [struct]

struct { ... } nudge::ColliderData::boxes

Anonymous struct instance used to access all the box colliders

◆ data [2/2]

SphereCollider* nudge::ColliderData::data

array of SphereCollider structs of size count

◆ [struct]

struct { ... } nudge::ColliderData::spheres

Anonymous struct instance used to access all the shpere colliders


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