QuickTopic (SM) free message boards QuickTopic (SM) free message boards
Skip to Messages
  Sign In to access your topic list  |New Topic |My Topics|Profile
Upgrade to Pro   Customize, show pictures, add an intro, and more:   QuickTopic Pro...and check out QuickThreadSM
Topic: OpenGL
Views: 4460, Unique: 2779 
Subscribers: 2
What's
this?
Printer-Friendly Page
Subscribe to get & post, or stop messages by email Subscribe
All messages    << 7-22  1-6 of 22        
About these ads
Who | When
Messagessort recent-top   
Post a new message
 
prakash  1
06-05-2003 08:51 AM ET (US)
How can I do orientation in OpenGL
lucaswPerson was signed in when posted  2
06-05-2003 11:27 AM ET (US)
Check out the orientation page that's the link below this page's in the OpenGL section of the lefthand side links. If you want, send me an email with more detailed description of what you already know how to do and what you need to know.
prakash  3
06-05-2003 02:56 PM ET (US)
I've now given the UpX, UpY, UpZ of the gluLookAt as sin(angle),
cos(angle),0 for z-axis orientation. Is this enough for getting orientation
in OpenGL.
Lucas Walter  4
06-05-2003 03:18 PM ET (US)
>
> I've now given the UpX, UpY, UpZ of the gluLookAt as sin(angle),
>
> cos(angle),0 for z-axis orientation. Is this enough for getting
> orientation
> in OpenGL.

I think that will get you some really strange results if you've tried that. UpX,Y,Z should be something like (0,1,0), and then something like (x + cos(angle), y + 0, z + sin(angle)) and (sin(angle),0,-cos(angle)) for the forwarding looking and right hand vector parameters. x,y,z is the location of the view, make them zero and you'll be able to rotate but not move.

-Luke
prakash venkiteswaran  5
06-06-2003 06:11 AM ET (US)
Dear Luke,
  Can u give me the details of the forwarding looking and right
hand vector parameters that you have given me. How will I give
the
specifications that you have given, in my program . I have to
give
orientation to an object( say a cone) in the screen and will
gluLookAt
will do it.
Regards
Prakash



___________________________________________________
Get www. mycompany .com and 5 matching email ids.
Just Rs. 1499/ year.
Click here http://www.rediffmailpro.com
Lucas Walter  6
06-06-2003 01:00 PM ET (US)
gluLookAt takes three sets of three floats, the first for the location of the eye/camera, the second for the location of whatever the camera is to be pointed at, and the last for the direction of 'up':

So before drawing the cone:

gluLookAt( locX, locY, locZ,
    locX + cos(angle), locY + 0 , locZ + sin(angle),
    0, 1 , 0); /* always be oriented with y as up */

.... draw cone etc.

Now that I look at it, my earlier message was giving you the wrong sets of parameters, but this one should work.
RSS link What's this?
All messages    << 7-22  1-6 of 22        
QuickTopicSM message boards
Over 200,000 topics served
Learn more Frequently asked questions  Acknowledgements
What they're saying about QuickTopic
 Questions, comments, or suggestions? Contact Us
Read our use policy before beginning. We value your privacy; please read our privacy statement.
Copyright ©1999-2008 Internicity Inc. All rights reserved.