Loading...


bookmark - Checking For Plane Intersection.

Checking For Plane Intersection.

 
 Discussion by sparkx with 3 Replies.
 Last Update: November 16, 2007, 11:50 pm
 
bookmark - Checking For Plane Intersection.  
Quickly Post to Checking For Plane Intersection.  w/o signup Share Info about Checking For Plane Intersection.  using Facebook, Twitter etc. email your friend about Checking For Plane Intersection. Print
Reply / Comment New Discussion / Topic Share / Bookmark E-Mail a Friend Print

Hello everyone. I am new to C++ game programming but I know so much already. I use 3D game programming in C++ at the moment. I was just wondering what the easiest way to check if two objects intersect in planes. Lets say I have two cubes with the sides of 5. My GL would be based off of float var x. Every vertex would be (x,x,x),(x,+5,x) est. Now to keep it simple I will assume that they are 2D not 3D. Here is an example of what my vertexes might be:
1 (front only) 2 (front only)
(0,5)(5,5) (-5,5)(0,5)
(0,0)(5,0) (-5,0)(0,0)

Up until now I have been running a long IF checking each side individually but this is long and doesn't work when I rotate my cube. What is the simplest way to check for plate intersection/collusion? I could set up a “while” statement for my current check, but first I want to check if anyone knows a better way.
I don't know if any of that made since to you. Feel free to say so I will make it clearer. Basically I want to find the collusion point(s) (if it collides) so I can perform math based off of the collusion point.
Thanks,
Sparkx

   Mon Nov 12, 2007    Reply         

As far as I know of, DirectX do provide an interface "ICollidable", of which you can create a sphere or rectangular box as the bounding sphere/box. From there you can detect directly from the API if the 2 object overlap each other, or collide in this case.

I've found a sample chapter that explain a little bit more, but it's in C#. Introduction to 3D Game Engine Design Using DirectX 9 and C#

You can search for similar terms under GL at google







   Mon Nov 12, 2007    Reply         

Thanks, I think that link is broken. I found some good projects online but I think I will get the SB version 4 to go further. Has anyone used it yet? Is it a good book for C++ game programming? It is huge and costs a lot (for a book) I would like to get some oppinions on this. Or is it better to just use things posted on the web and sample projects. I was hoping to find a better way to test for collusion, afterall how do people that make big games get collusions for complex objects. Do they set up an array or is there a function that checks for collusion? It would seem crazy if they made all collusions by hand. I have found a few GREAT websites that have lots of content but they don't include some things I have been looking for.
Thanks,
Sparkx

   Fri Nov 16, 2007    Reply         


QUOTE (sparkx)

Thanks, I think that link is broken. I found some good projects online but I think I will get the SB version 4 to go further. Has anyone used it yet? Is it a good book for C++ game programming? It is huge and costs a lot (for a book) I would like to get some oppinions on this. Or is it better to just use things posted on the web and sample projects. I was hoping to find a better way to test for collusion, afterall how do people that make big games get collusions for complex objects. Do they set up an array or is there a function that checks for collusion? It would seem crazy if they made all collusions by hand. I have found a few GREAT websites that have lots of content but they don't include some things I have been looking for.
Thanks,
Sparkx
Link: view Post: 114108

Books usually is better, in the sense that everything is structured and easy to follow, and you can easily find sample for "ordinary" stuffs. But when you reach a level that you can handle most programming task, but just need to know how to do certain task(usually not ordinary ones), then books might bot be that helpful. I'm been facing that kind of problem. A while back, i need to write a program to display multiple video onto a few 3d surfaces, at the same time manipulate the surface's physical. No books give a good enough sample to reach what I wanted. So i resort to searching on the internet. But the obstacle is that you have to get the right keyword to search. Took me quite a while reading other's forum and sample, and then finally, got it working after a few months of research.

I have another site to recommend, http://gpwiki.org/. Just search for collision. They have forums and also a quite a lot of useful tutorial.

Good luck

   Fri Nov 16, 2007    Reply         

Quickly Post to Checking For Plane Intersection.  w/o signup Share Info about Checking For Plane Intersection.  using Facebook, Twitter etc. email your friend about Checking For Plane Intersection. Print
Reply / Comment New Discussion / Topic Share / Bookmark E-Mail a Friend Print

Similar Topics:

Plane Makes Emergency Landing No O...

This story from url="http://www.cnn.com/2005/US/09/21/airliner.emergency.ap/index.html"]CNN[/url LOS ANGELES, California (AP) -- A JetBlue airliner with its front landing gear stuck sideways safely landed Wednesday, balancing on its back wheels as it slowed on the runway at L ...more

   22-Sep-2005    Reply         

Type Checking Not Work On For .. In...

It seems that the actionscript 2.0 type checking was not work as expected on some place. When variables was created on for .. in loop. It will allow any variable type to be used. Or it is default construt !? CODEvar dayNames1:Array = ["Sunday& ...more

   06-Sep-2008    Reply         

Plane Crash Joke

Five people are on a plane, four guys and one girl. Suddenly the engine stalls and they crash. Miraculously all five of them survive the crash but are stranded on a small deserted island. Since these four guys will need to have their natural urges satisfied, they decided to make up a schedule. Each ...more

   12-Sep-2009    Reply         

Starting To Build A New Php Mmo need some help/idea refinement.   Starting To Build A New Php Mmo need some help/idea refinement. (0) (0) Mafia Game   Mafia Game