Beispiel #1
0
func (a *Rect) HasIntersection(b *Rect) bool {
	_a := (*C.SDL_Rect)(unsafe.Pointer(a))
	_b := (*C.SDL_Rect)(unsafe.Pointer(b))
	return C.SDL_HasIntersection(_a, _b) > 0
}
Beispiel #2
0
// Rect (https://wiki.libsdl.org/SDL_HasIntersection)
func (a *Rect) HasIntersection(b *Rect) bool {
	return C.SDL_HasIntersection(a.cptr(), b.cptr()) > 0
}
Beispiel #3
0
func (a *Rect) HasIntersection(b *Rect) bool {
	return C.SDL_HasIntersection((*C.SDL_Rect)(unsafe.Pointer(a)), (*C.SDL_Rect)(unsafe.Pointer(b))) == C.SDL_TRUE
}
Beispiel #4
0
func (r *Rect) HasIntersection(r2 *Rect) bool {
	return C.SDL_HasIntersection(r.c(), r2.c()) == C.SDL_TRUE
}