Solved

OpenGL object picking and dragging

Posted on 2009-07-06
2
1,556 Views
Last Modified: 2015-01-05
How do I write OpenGL code that displays 3D objects (like Cubes) in which I can pick one or more objects and drag them to change their position?  I would prefer this solution to be in Java & SWT.  Code in C++ is also ok.
0
Comment
Question by:sankartadi
2 Comments
 
LVL 25

Accepted Solution

by:
InteractiveMind earned 500 total points
ID: 24790117
NeHe has great OpenGL tutorials which include drawing a cube (these are easily adapted to JoGL):
http://nehe.gamedev.net/lesson.asp?index=01

And for picking objects, see
http://www.opengl.org/resources/faq/technical/selection.htm

(To get the mouse_x and mouse_y coordinates, just add an AWT mouse listener to your canvas)
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

What is RenderMan: RenderMan is a not any particular piece of software. RenderMan is an industry standard, defining set of rules that any rendering software should use, to be RenderMan-compliant. Pixar's RenderMan is a flagship implementation of …
Recently, in one of the tech-blogs I usually read, I saw a post about the best-selling video games through history. The first place in the list is for the classic, extremely addictive Tetris. Well, a long time ago, in a galaxy far far away, I was…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

821 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