Ejemplo n.º 1
0
// Shapes returns the colliding shapes involved for this arbiter.
// The order of their CollisionType values will match the order set when the collision
// handler was registered.
func (arb Arbiter) Shapes() (Shape, Shape) {
	var a, b *C.cpShape
	C.cpArbiterGetShapes(arb.c(), (**C.cpShape)(unsafe.Pointer(&a)), (**C.cpShape)(unsafe.Pointer(&b)))
	return cpShape(a), cpShape(b)
}
Ejemplo n.º 2
0
func (a *Arbiter) GetShapes() (*Shape, *Shape) {
	var shape_a, shape_b *C.cpShape
	C.cpArbiterGetShapes(a.CPArbiter, &shape_a, &shape_b)
	return LookupShape(shape_a), LookupShape(shape_b)
}