# The Industry's Foundation for High Performance Graphics

1. ## Intersection area

Hi

I have a few objects in the scene - where I need to find their intersection with the floor - I can find the area and coordinates of the intersection of each object with the floor - what I need is to work out the total intersected area - bearing in mind that the objects can be moved around in the scene and their intersected areas may or may not overlap with each other - How do I implement this (may be using boolean operators? - I 'm not quite sure how though) Any ideas and sample code?

Cheers

2. ## Re: Intersection area

Intersection test is a quite huge chapter, maybe an nice example of intersection test would help you.
Have a glance on this Nehe Tutorial, it includes balls moving around in a room intersecting with the walls and each others.
http://nehe.gamedev.net/tutorials/lesson31.asp

3. ## Re: Intersection area

Thanx - I 've had a look at the link - it's not quite what I need - I can find the coordinates of interesected area an object in the scene eg cube with the floor. All I need is to know is an easy way to find total intersected area of say three cubes overlap each other and also intersects with the floor - their intersecting area will also overlap - it is this area that I need to find out. There may also be cases when they don't overlap.

any ideas

cheers

[This message has been edited by fox (edited 02-02-2002).]

4. ## Re: Intersection area

I'd be interested to know why you want to do this...

The big question is what sort of performance you need. The obvious solution would be an image-space one: clear the screen to color A, set up an orthographic camera looking straight down at the floor and with a view volume big enough to contain all your objects, render your objects in colour B, then grab the contents of the framebuffer and count the number of B pixels.

Won't be very fast though...

5. ## Re: Intersection area

Couldnt you just calculate the volumes of the objects in worldspace and sum up the results subtracting it by the ground surface?

Like this:

Volume integral of Shape A + Volume integral of Shape B - Volume integral of Ground.

(Im desperately trying to find my calculus book )

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•