Linked Questions

-3 votes
1 answer
282 views

Hi i am trying to make the blue object collide with the green one, but I cannot get the whole area of the square, i only detect half....and down the entire Y + X axis's if (blue.x >= green.x &...
user3131252's user avatar
416 votes
22 answers
370k views

I am trying to write a C++ program that takes the following inputs from the user to construct rectangles (between 2 and 5): height, width, x-pos, y-pos. All of these rectangles will exist parallel to ...
Rob Burke's user avatar
  • 5,525
60 votes
8 answers
76k views

I have two rectangles characterized by 4 values each : Left position X, top position Y, width W and height H: X1, Y1, H1, W1 X2, Y2, H2, W2 Rectangles are not rotated, like so: +-------------------...
Majid Laissi's user avatar
  • 19.8k
15 votes
6 answers
16k views

I'm looking for an algorithm to solve this problem: Given N rectangles on the Cartesian coordinate, find out if the intersection of those rectangles is empty or not. Each rectangle can lie in any ...
Chan Le's user avatar
  • 2,214
6 votes
5 answers
5k views

I have two ImageView One is fixed at a position On Second I need to apply drag an drop functionality. What I need: Drag second ImageView to the another ImageView and when they intersect than I ...
Akarsh M's user avatar
  • 1,611
6 votes
5 answers
11k views

The OBBs have a position(x,y), a velocity(x,y) and an orientation(Matrix). Given periodic updates, the OBBs must collide with each other, returning the fraction of the move that was deemed successful....
Michael Labbé's user avatar
4 votes
2 answers
4k views

This is what I am currently doing: Creating 4 axis that are perpendicular to 4 edges of 2 rectangles. Since they are rectangles I do not need to generate an axis (normal) per edge. I then loop over ...
Bruk Habtu's user avatar
10 votes
1 answer
2k views

I don't know where to start with this one. Obviously CGRectIntersectsRect will not work in this case, and you'll see why. I have a subclass of UIView that has a UIImageView inside it that is placed ...
Liftoff's user avatar
  • 25.6k
4 votes
2 answers
3k views

I come across this math problem which is needed to complete my application, so I'm asking for help. Given 2 (or more, but basically for 2) rectangles with 2 known points for each: Top-left(x1, y1) ...
xx3004's user avatar
  • 778
2 votes
1 answer
7k views

I read about intersection rectangles on: Algorithm to detect intersection of two rectangles? But i have trouble to implement it. If R1 (A,B,C,D) is my rotated rectangle and R2(A',B',C',D') the ...
coulix's user avatar
  • 3,388
7 votes
3 answers
2k views

I would like to detect if two rotated divs are colliding. I know how to do it if they're not rotated, but I don't know how to do it when they actually are. I have tried some collision plugins such as ...
Imanol Pérez Arribas's user avatar
3 votes
2 answers
2k views

I'm working on an app that displays a large image just about the same way as Google Maps. As the user drags the map, more images are loaded so that when a new part of the map is visible, the ...
rodrigo-silveira's user avatar
0 votes
2 answers
1k views

What is quick way to check collision between 2 rectangles then you have rectangle coordinates like: Red rectangle: A1(x1, y1), B1(x2, y2). Blue rectangle: A2(x3, y3), B2(x4, y4).
wyy's user avatar
  • 545
1 vote
1 answer
2k views

I have two ImageViews and I want to detect the intersection between the two images. So I decided to find a solution online, I'm using getDrawingRect to draw a rectangle, wrapping with the ImageView. ...
AndroidBeginner's user avatar
3 votes
2 answers
1k views

Moving ahead from previous question.I have two rectangle and they look like this: struct Rect { NSPoint topLeft; NSPoint topRight; NSPoint bottomLeft; NSPoint bottomRight; } I use something ...
Raviprakash's user avatar
  • 2,450

15 30 50 per page