NudgeRealm

represents a context for nudge

Constructors

this
this(uint max_bodies, uint max_boxes, uint max_spheres)

initializes a nudge realm with the given maximums

Members

Functions

allocate
void allocate()

allocate memory for nudge

append_body
uint append_body(nudge.Transform transform, nudge.BodyProperties properties, nudge.BodyMomentum momentum)

append a new body, return the id

append_box_collider
uint append_box_collider(uint body_id, nudge.BoxCollider collider, nudge.Transform transform, uint tag)

append a box collider and get its index

append_sphere_collider
uint append_sphere_collider(uint body_id, nudge.SphereCollider collider, nudge.Transform transform, uint tag)

append a sphere collider and get its index

clear_body
void clear_body(uint id)

clear the data of a body with matching id

clear_box_collider
void clear_box_collider(uint id)

zero the data of a box collider index

clear_sphere_collider
void clear_sphere_collider(uint id)

zero the data of a sphere collider index

destroy
void destroy()
Undocumented in source. Be warned that the author may not have intended to support it.
pop_last_body
void pop_last_body()

pop the last body off

pop_last_box_collider
void pop_last_box_collider()

pop the last box collider off

pop_last_sphere_collider
void pop_last_sphere_collider()

pop the last sphere collider off

swap_bodies
void swap_bodies(uint id_src, uint id_dst)

swap two bodies given their indices

swap_box_colliders
void swap_box_colliders(uint id_src, uint id_dst)

swap two box colliders given their indices

swap_sphere_colliders
void swap_sphere_colliders(uint id_src, uint id_dst)

swap two sphere colliders given their indices

Variables

active_bodies
nudge.ActiveBodies active_bodies;
Undocumented in source.
arena
nudge.Arena arena;
Undocumented in source.
arena_size
size_t arena_size;
Undocumented in source.
bodies
nudge.BodyData bodies;
Undocumented in source.
colliders
nudge.ColliderData colliders;
Undocumented in source.
contact_cache
nudge.ContactCache contact_cache;
Undocumented in source.
contact_data
nudge.ContactData contact_data;
Undocumented in source.
identity_transform
enum nudge.Transform identity_transform;
Undocumented in source.
max_bodies
const(uint) max_bodies;
Undocumented in source.
max_boxes
const(uint) max_boxes;
Undocumented in source.
max_spheres
const(uint) max_spheres;
Undocumented in source.
zero_momentum
enum nudge.BodyMomentum zero_momentum;
Undocumented in source.
zero_vec
enum float[3] zero_vec;
Undocumented in source.

Meta