Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

3D Objects & Collision

Posted on 1997-01-30
1
Medium Priority
?
505 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
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.

722 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