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

Functions

unsigned add_compound_prism (context_t *c, float mass, float radius, float hheight, unsigned num_lateral_faces=0, const Transform *T=NULL, AxisEnum axis=AXIS_Y, const float comOffset[3]=NULL)
 Adds a new body to the simulation with a compound collider that represents a prism of 4 or more lateral faces.
 
unsigned add_compound_prism (context_t *c, float mass, float radius, float hheight, unsigned num_lateral_faces, const float *mMatrix16WithoutScaling, AxisEnum axis=AXIS_Y, const float comOffset[3]=NULL)
 
unsigned add_compound_cylinder (context_t *c, float mass, float radius, float hheight, const Transform *T=NULL, AxisEnum axis=AXIS_Y, unsigned num_boxes=0, unsigned num_spheres=0, const float comOffset[3]=NULL, float box_lateral_side_shrinking=-1.f)
 Adds a new body to the simulation with a compound collider that represents a cylinder.
 
unsigned add_compound_cylinder (context_t *c, float mass, float radius, float hheight, const float *mMatrix16WithoutScaling, AxisEnum axis=AXIS_Y, unsigned num_boxes=0, unsigned num_spheres=0, const float comOffset[3]=NULL, float box_lateral_side_shrinking=-1.f)
 
unsigned add_compound_capsule (context_t *c, float mass, float radius, float hheight, const Transform *T=NULL, AxisEnum axis=AXIS_Y, unsigned num_boxes=1, unsigned num_spheres=3, const float comOffset[3]=NULL, float box_lateral_side_shrinking=-1.f)
 Adds a new body to the simulation with a compound collider that represents a capsule.
 
unsigned add_compound_capsule (context_t *c, float mass, float radius, float hheight, const float *mMatrix16WithoutScaling, AxisEnum axis=AXIS_Y, unsigned num_boxes=1, unsigned num_spheres=3, const float comOffset[3]=NULL, float box_lateral_side_shrinking=-1.f)
 
unsigned add_compound_hollow_cylinder (context_t *c, float mass, float min_radius, float max_radius, float hheight, const Transform *T=NULL, AxisEnum axis=AXIS_Y, unsigned num_boxes=8, const float comOffset[3]=NULL)
 Adds a new body to the simulation with a compound collider that represents the hollow lateral surface of a cylinder.
 
unsigned add_compound_hollow_cylinder (context_t *c, float mass, float min_radius, float max_radius, float hheight, const float *mMatrix16WithoutScaling, AxisEnum axis=AXIS_Y, unsigned num_boxes=8, const float comOffset[3]=NULL)
 
unsigned add_compound_torus (context_t *c, float mass, float radius, float inner_radius, const Transform *T=NULL, AxisEnum axis=AXIS_Y, unsigned num_boxes=8, const float comOffset[3]=NULL)
 Adds a new body to the simulation with a compound collider that represents a torus.
 
unsigned add_compound_torus (context_t *c, float mass, float radius, float inner_radius, const float *mMatrix16WithoutScaling, AxisEnum axis=AXIS_Y, unsigned num_boxes=8, const float comOffset[3]=NULL)
 
unsigned add_compound_cone (context_t *c, float mass, float radius, float hheight, const Transform *T=NULL, AxisEnum axis=AXIS_Y, unsigned num_boxes=0, unsigned num_spheres=0, const float comOffset[3]=NULL)
 Adds a new body to the simulation with a compound collider that represents an approximated cone.
 
unsigned add_compound_cone (context_t *c, float mass, float radius, float hheight, const float *mMatrix16WithoutScaling, AxisEnum axis=AXIS_Y, unsigned num_boxes=0, unsigned num_spheres=0, const float comOffset[3]=NULL)
 
unsigned add_compound_staircase (context_t *c, float mass, float hdepth, float hheight, float hlength, unsigned num_steps=15, const Transform *T=NULL, int orientation_in_0_3=0, const float comOffset[3]=NULL)
 Adds a new body to the simulation with a compound collider that represents a staircase; please note that the inertia is not calculated (or even approximated) correctly (only relevant when used as dynamic body)
 
unsigned add_compound_staircase (context_t *c, float mass, float hdepth, float hheight, float hlength, unsigned num_steps, const float *mMatrix16WithoutScaling, int orientation_in_0_3=0, const float comOffset[3]=NULL)