gluProject help
How do I get the model, view and projection matrix for calling gluProject?
Code:
GLdouble modelviewMatrix[16];
GLdouble projectionMatrix[16];
GLint viewport[4];
glGetDoublev(GL_MODELVIEW_MATRIX, modelviewMatrix);
glGetDoublev(GL_PROJECTION_MATRIX, projectionMatrix);
glGetIntegerv(GL_VIEWPORT, viewport);
Hmm I don't know, but I looked in the command line (typed in "man gluProject"). Try glGet maybe?? I'm not sure so type in "man glGet" in the command line to get the details. I've been looking for something to output the current verticies like something below. If any one can help me out too that would be nice.
glTranslatef(x,y,z);
glRotate(angle, 0.0, 0.0, 1.0);
// print out what x and y equal after they're rotated by "angle".
Iceman
Update: Dang OSC got his post out before I was done typing!
glTranslatef(x,y,z);
glRotate(angle, 0.0, 0.0, 1.0);
// print out what x and y equal after they're rotated by "angle".
Iceman
Update: Dang OSC got his post out before I was done typing!
Is this a record? OSC answered a question in 12 minutes.
Thanks!
Thanks!
Nah I'm usually much faster.
Iceman, you can multiply by the modelview matrix to figure out where your vertices are getting transformed to, not sure if that's really what you want to do, though.
Iceman, you can multiply by the modelview matrix to figure out where your vertices are getting transformed to, not sure if that's really what you want to do, though.
Faster?!! I guess that's what I feared about using OpenGL to get the transformation; it would be way over my head with matrices and such. I'm using another method for now anyway; I just use radians, cosine, and sine to calculate it.
Thanks,
Iceman
Thanks,
Iceman
Possibly Related Threads...
Thread:  Author  Replies:  Views:  Last Post  
Two gluProject points?  mikey  5  6,012 
Jan 5, 2012 01:03 PM Last Post: mikey 

Hierarchy, gluProject and collision detection  lemtoo  3  5,287 
Nov 30, 2007 09:26 AM Last Post: lemtoo 

gluProject <> gluUnproject help please  szgezu  9  8,610 
Feb 26, 2006 11:50 AM Last Post: szgezu 