Project Ne10
An Open Optimized Software Library Project for the ARM Architecture
Functions
Collision Detection

Functions

void ne10_physics_compute_aabb_vec2f_c (ne10_mat2x2f_t *aabb, ne10_vec2f_t *vertices, ne10_mat2x2f_t *xf, ne10_vec2f_t *radius, ne10_uint32_t vertex_count)
 compute AABB for ploygon. More...
 
void ne10_physics_relative_v_vec2f_c (ne10_vec2f_t *dv, ne10_vec3f_t *v_wa, ne10_vec2f_t *ra, ne10_vec3f_t *v_wb, ne10_vec2f_t *rb, ne10_uint32_t count)
 calculate relative velocity at contact. More...
 
void ne10_physics_apply_impulse_vec2f_c (ne10_vec3f_t *v_wa, ne10_vec3f_t *v_wb, ne10_vec2f_t *ra, ne10_vec2f_t *rb, ne10_vec2f_t *ima, ne10_vec2f_t *imb, ne10_vec2f_t *p, ne10_uint32_t count)
 apply contact impulse. More...
 

Detailed Description

Collision detection typically refers to the computational problem of detecting the intersection of two or more objects.
This set of functions are used for collision detection algorithm for 32-bit float data types. Currently compute AABB, caculate relative velocity and apply contact impulse were implemented.

Function Documentation

◆ ne10_physics_apply_impulse_vec2f_c()

void ne10_physics_apply_impulse_vec2f_c ( ne10_vec3f_t v_wa,
ne10_vec3f_t v_wb,
ne10_vec2f_t ra,
ne10_vec2f_t rb,
ne10_vec2f_t ima,
ne10_vec2f_t imb,
ne10_vec2f_t p,
ne10_uint32_t  count 
)

apply contact impulse.

Parameters

Definition at line 176 of file NE10_physics.c.

◆ ne10_physics_compute_aabb_vec2f_c()

void ne10_physics_compute_aabb_vec2f_c ( ne10_mat2x2f_t *  aabb,
ne10_vec2f_t vertices,
ne10_mat2x2f_t *  xf,
ne10_vec2f_t radius,
ne10_uint32_t  vertex_count 
)

compute AABB for ploygon.

Parameters
[out]*aabbreturn axis aligned box
[in]*verticesa convex polygon
[in]*xfthe position and orientation of rigid
[in]radiusthe aligned bounding
[in]vertex_countvertices count of convex ploygen
Returns
none. The function is to compute AABB for ploygon. vertex_count > 0.

Definition at line 95 of file NE10_physics.c.

◆ ne10_physics_relative_v_vec2f_c()

void ne10_physics_relative_v_vec2f_c ( ne10_vec2f_t dv,
ne10_vec3f_t v_wa,
ne10_vec2f_t ra,
ne10_vec3f_t v_wb,
ne10_vec2f_t rb,
ne10_uint32_t  count 
)

calculate relative velocity at contact.

Parameters
[out]*dvreturn relative velocity
[in]*v_wavelocity and angular velocity of body a
[in]*radistance vector from center of mass of body a to contact point
[in]*v_wbvelocity and angular velocity of body b
[in]*rbdistance vector from center of mass of body b to contact point
[in]countthe number of items
Returns
none.

To improve performance, 2 items are processed in one loop

Definition at line 132 of file NE10_physics.c.