Solved

3D Objects & Collision

Posted on 1997-01-30
1
502 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 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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone 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

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 …
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 technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

752 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