Solved

3D Objects & Collision

Posted on 1997-01-30
1
500 Views
Last Modified: 2012-06-21
I am trying to write a program in C++ (UNIX) using OpenGL that enables me to click and drag two or more 3D objects dispersed in space so that when they touch each other, they fuse/stick together and thereafter can be moved together.

The objects range from simple spheres and cubes to complex models.  More importantly, I am trying to make this "fusing together" action generate an event such as playing a quicktime movie or a gif animation or even affect the behavior of another object. That is, when two or more objects are dragged and made to touch one another, an event is generated (such a movie). This may or may not utilize the capabilities of OpenGl....other suggestions are welcome.
0
Comment
Question by:ashish112396
1 Comment
 

Accepted Solution

by:
jordan122196 earned 120 total points
ID: 1161948
I don't believe Open GL has any sort of mechanism
for "collision detection"(this is what this
problem is referred to as in computer graphics
circles).  So it looks like this is going to have
to be all handled in your code.

If you know you will only deal with objects with
polygonal planar polygons, you can look at the
distances between vertices of a moving object
and the vertices of potential collided-with objects.

You can determine the potential objects by looking
at all of them, or use a space subdivision
algorithm like an oct-tree.

If you have alot of vertices though, this could
work out to be slow.  Real-time collision
detection is something still sought out by
researchers in the field of computer graphics.
In fact, I believe I had seen a talk one time
by a Dr. Manocha and his wife Dr. Ling.  They
showed a brief video on collision detection
using this approach in a VR setting.  You could
possibly access there papers at www.cs.ncu.edu.
You should find them under the graphics lab link
they have there.

On a final side note, blobby objects and metaballs
are a way people have handling bonding of objects.
The objects flow and bond together based on how
atomic bonds work.  This would limit your objects
to being only made out of blobbies and not
polygonal data.

Hopefully something in there helped you out.
Have Fun.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question