Project Ne10
An open, optimized software library for the ARM architecture.
Functions | Variables
Collision Detection

Functions

void ne10_physics_relative_v_vec2f_neon (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) asm("ne10_physics_relative_v_vec2f_neon")
 Specific implementation of ne10_physics_relative_v_vec2f using NEON SIMD capabilities. More...
 
void ne10_physics_apply_impulse_vec2f_neon (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) asm("ne10_physics_apply_impulse_vec2f_neon")
 Specific implementation of ne10_physics_apply_impulse_vec2f using NEON SIMD capabilities. More...
 
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)
 Specific implementation of ne10_physics_compute_aabb_vec2f using plain C. 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)
 Specific implementation of ne10_physics_relative_v_vec2f using plain C. 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)
 Specific implementation of ne10_physics_apply_impulse_vec2f using plain C. More...
 
void ne10_physics_compute_aabb_vec2f_neon (ne10_mat2x2f_t *aabb, ne10_vec2f_t *vertices, ne10_mat2x2f_t *xf, ne10_vec2f_t *radius, ne10_uint32_t vertex_count)
 Specific implementation of ne10_physics_compute_aabb_vec2f using NEON SIMD capabilities. More...
 

Variables

void(* ne10_physics_compute_aabb_vec2f )(ne10_mat2x2f_t *aabb, ne10_vec2f_t *vertices, ne10_mat2x2f_t *xf, ne10_vec2f_t *radius, ne10_uint32_t vertex_count)
 Compute the AABB for a polygon. More...
 
void(* ne10_physics_relative_v_vec2f )(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 )(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

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 
)

Specific implementation of ne10_physics_apply_impulse_vec2f using plain C.

Definition at line 146 of file NE10_physics.c.

void ne10_physics_apply_impulse_vec2f_neon ( 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 
)

Specific implementation of ne10_physics_apply_impulse_vec2f using NEON SIMD capabilities.

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 
)

Specific implementation of ne10_physics_compute_aabb_vec2f using plain C.

Definition at line 83 of file NE10_physics.c.

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

Specific implementation of ne10_physics_compute_aabb_vec2f using NEON SIMD capabilities.

To improve performance, four vertices are processed per loop iteration. As such, vertex_count must be a multiple of four.

Definition at line 82 of file NE10_physics.neon.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 
)

Specific implementation of ne10_physics_relative_v_vec2f using plain C.

Definition at line 112 of file NE10_physics.c.

void ne10_physics_relative_v_vec2f_neon ( 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 
)

Specific implementation of ne10_physics_relative_v_vec2f using NEON SIMD capabilities.

Variable Documentation

void(* ne10_physics_apply_impulse_vec2f) (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
[in,out]*v_wareturn velocity and angular velocity of body a
[in,out]*v_wbreturn velocity and angular velocity of body b
[in]*radistance vector from center of mass of body a to contact point
[in]*rbdistance vector from center of mass of body b to contact point
[in]*imaconstant of body a
[in]*imbconstant of body b
[in]*pconstant
[in]countthe number of items

To improve performance, two items are processed in one loop. Points to ne10_physics_apply_impulse_vec2f_c or ne10_physics_apply_impulse_vec2f_neon.

Definition at line 79 of file NE10_init_physics.c.

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

Compute the AABB for a polygon.

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

The function computes the AABB for a polygon. Points to ne10_physics_compute_aabb_vec2f_c or ne10_physics_compute_aabb_vec2f_neon, the latter of which requires that vertex_count is a multiple of 4.

Definition at line 68 of file NE10_init_physics.c.

void(* ne10_physics_relative_v_vec2f) (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

To improve performance, two items are processed in one loop. Points to ne10_physics_relative_v_vec2f_c or ne10_physics_relative_v_vec2f_neon.

Definition at line 73 of file NE10_init_physics.c.