Solved

3D Objects & Collision

Posted on 1997-01-30
1
497 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

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 goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

760 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now