Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

3D Objects & Collision

Posted on 1997-01-30
1
Medium Priority
?
506 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 240 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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
Suggested Courses

885 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