answersLogoWhite

0


Best Answer

If you know the location of the 4 corners you could check if any of the points on Rect1 are in the horizontal range of Rect2's x0 -> x1 and the vertical range of Rect2's y0 -> y1. You would also have to check the opposite set, to cover the case where Rect2 is completely inside Rect1.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Whats the code for detecting the collision of two bouncing rectangles in C plus plus?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Whats the difference between a cube and a cuboid?

A cube has six square faces. A cuboid also has six faces but 4 or 6 or them may be rectangles.


What would cause bouncing gauges after hooking a battery up backwards in a car?

hi if u connect the battery the wrong way the gauges will bouncing this is because the gauges has whats called a ballast resistor an diodes this prevent the voltage current to flow only in one direction so it wil be preventing burning of the gauges


You were in a collision and your front driver wheel squeels when you accelerate like it maybe turned another way whats the problem?

the problem is u need to take it to an alignment shop and have it aligned. u can wear your tire down till it pops if u leave it,


Whats the biggest size tire that will fit on your stock 1994 geo tracker?

31" x 10.5"... would recommend at least a small lift to the truck if you plan on bouncing around at all... they should be fine on road unless you happen to smoke a big pothole. Regards Josh Marshall


What is Ke pasa in Spanish?

"¿Qué pasa?" in Spanish translates to "What's up?" or "What's going on?" It is a common informal greeting to ask how someone is doing or what they are up to.


What is A Good question when playing the quesition gamefor kids?

Whats your Favorite Color? Whats Your Favorite T.V Show? Whats Your Favorite Song? Whats Your Favorite Book?


Whats 718412-92139= whats the answer?

The answer is 626,273


What if you get a ticket for being at fault in a car accident but it's not your fault?

Sometimes a police report addresses who was more at fault and a cite may be issued. It does not mean that the other party was completely not at fault. If you ask almost anyone that has been involved in a collision, its never their fault. I dont say that to be sarcastic, but drivers have different viewpoints of the events and whats "fair". For clarification and additional information you can hire a collision reconstructionist such as myself to review the report and offer suggestions on your position and options.


Winning eleven 6 free and fast download?

whats you name ? whats you name ? whats you name ?


wHaTs YoUr FaVoRiTe WoRd To SaY!! ;) mines is " thats whats up?

"tahst whats up" lol -_- ;)


whats the employee id?

whats the employee id


Whats the meaning of criminal recklessness?

whats recklessness?