89 ne10_vec2f_t lower = ne10_mul_matvec_float (*xf, vertices[0]);
94 for (i = 1; i < vertex_count; ++i)
96 v = ne10_mul_matvec_float (*xf, vertices[i]);
97 lower = min_2f (lower, v);
98 upper = max_2f (upper, v);
101 aabb->
c1.
r1 = lower.
x - radius->
x;
102 aabb->
c1.
r2 = lower.
y - radius->
y;
103 aabb->
c2.
r1 = upper.
x + radius->
x;
104 aabb->
c2.
r2 = upper.
y + radius->
y;
123 for (i = 0; i < count; i++)
125 va.
x = v_wa->
x - v_wa->
z * ra->
y;
126 va.
y = v_wa->
y + v_wa->
z * ra->
x;
127 vb.
x = v_wb->
x - v_wb->
z * rb->
y;
128 vb.
y = v_wb->
y + v_wb->
z * rb->
x;
157 for (i = 0; i < count; i++)
159 v_wa->
x -= ima->
x * p->
x;
160 v_wa->
y -= ima->
x * p->
y;
161 v_wa->
z -= ima->
y * (ra->
x * p->
y - ra->
y * p->
x);
163 v_wb->
x += imb->
x * p->
x;
164 v_wb->
y += imb->
x * p->
y;
165 v_wb->
z += imb->
y * (rb->
x * p->
y - rb->
y * p->
x);
A 2-tuple of ne10_float32_t values.
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.
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.
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.
A 3-tuple of ne10_float32_t values.