Esempio n. 1
0
// Bodies returns the colliding bodies involved for this arbiter.
// The order of the CollisionType the bodies are associated with values will match
// the order set when the collision handler was registered.
func (arb Arbiter) Bodies() (Body, Body) {
	var a, b *C.cpBody
	C.cpArbiterGetBodies(arb.c(), (**C.cpBody)(unsafe.Pointer(&a)), (**C.cpBody)(unsafe.Pointer(&b)))
	return cpBody(a), cpBody(b)
}
Esempio n. 2
0
func (a *Arbiter) GetBodies() (*Body, *Body) {
	var body_a, body_b *C.cpBody
	C.cpArbiterGetBodies(a.CPArbiter, &body_a, &body_b)
	return LookupBody(body_a), LookupBody(body_b)
}