Skip to main content
gamedev.net
🔒 Locked

Intersecting RECTs

Started by JoHnOnIzEr Aug 5, 2003 at 11:42 PM 3 replies 500+ views
Original Post
JoHnOnIzEr
JoHnOnIzEr
How can i determine if two rects intersect? I know there is an API call for this but i cant remember what it is. EDIT: I forgot to mention im using VB [edited by - JoHnOnIzEr on August 5, 2003 12:42:56 AM]
Sidra Headquarters
Game engine is currently at version 0.9.8! Currently Down
Martee
Martee
IntersectRect()
ReactOS - an Open-source operating system compatible with Windows NT apps and drivers
JoHnOnIzEr
JoHnOnIzEr
What parameters are passed to it? ;x
Sidra Headquarters
Game engine is currently at version 0.9.8! Currently Down
Martee
Martee
MSDN is your friend!
quote:

BOOL IntersectRect(
LPRECT lprcDst, // intersection buffer
CONST RECT *lprcSrc1, // first rectangle
CONST RECT *lprcSrc2 // second rectangle
);

Parameters

lprcDst
[out] Pointer to the RECT structure that is to receive the intersection of the rectangles pointed to by the lprcSrc1 and lprcSrc2 parameters. This parameter cannot be NULL.
lprcSrc1
[in] Pointer to the RECT structure that contains the first source rectangle.
lprcSrc2
[in] Pointer to the RECT structure that contains the second source rectangle.


You''ll have to convert that into VB syntax, of course.
ReactOS - an Open-source operating system compatible with Windows NT apps and drivers

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.