예제 #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
}
예제 #2
0
파일: rect.go 프로젝트: flazz/go-sdl2
// Rect (https://wiki.libsdl.org/SDL_HasIntersection)
func (a *Rect) HasIntersection(b *Rect) bool {
	return C.SDL_HasIntersection(a.cptr(), b.cptr()) > 0
}
예제 #3
0
파일: render.go 프로젝트: jbondeson/Go-SDL2
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
}
예제 #4
0
파일: rect.go 프로젝트: willemvds/sdl
func (r *Rect) HasIntersection(r2 *Rect) bool {
	return C.SDL_HasIntersection(r.c(), r2.c()) == C.SDL_TRUE
}