Re: which block I can see
What do you mean by Tolerance?
And can your Source rectangle only look in one direction?
Re: which block I can see
source rectangle only look 1 direction
tolerance is the distance between source to other rectangles
example
What source rectangle can see in 8ft
Re: which block I can see
maybe it's the english, but i'm confused.. what is he actually asking?
Re: which block I can see
My best guess is that he has a "source box", which looks in one direction for some distance, and attempts to see other destination boxes. These boxes are stored in an array that gives their position, rotation, and dimensions. What I believe he wants to know given this setup is, which boxes are completely hidden by other boxes? Conversely, which boxes can be partially seen from an eye facing only in one direction traveling along the entire edge of the source box.
This could be brute-forced pretty effectively, I would think, but I don't want to work out the math needed since it's really tedious and can be done with some basic knowledge of programming and algebra. If you post whatever you've tried clear_zero, I'd be happy to check it out and see where you're stuck.
Re: which block I can see
Can't you just check if block 1, 2, 3, 4 or 5 are hidden completely behind blocks 6 or 7?
Just do a check that calculates if the origin (star I presume) of block 6/7 is smaller than (in terms of the x-direction) the origin of block 1/2/3/4/5 and that the width of block 6/7 is larger than the width of block 1/2/3/4/5.
I think that's the only time a block can not be seen, so all the other times it can be seen?
Re: which block I can see
You also have to account for rotations, but I think that's the general idea. Like I said the brute force method isn't really that tough, which is why I asked where the OP got stuck :)
Re: which block I can see
http://i166.photobucket.com/albums/u...Opposite-1.jpg
I use AutoCAD to find the rectangle, the main thought is
scan the area (Red box is the area i need th scan) from the right bottom corner, if the selection square(yellow box) has more than 2 rectangle, then break the square into 2 small parts(white and blue box) then scan it, until only one rectangle in the selection square
The problem is it is slow. any other way to make it quicker
Thanks
ps: I am she :)