Sign in to follow this  
Eitsch

Get Coordinates of Transformed Geometry

Recommended Posts

Eitsch    188
an example: glPushMatrix(); glRotatef(39,1.0,0.0,0.0); glBegin(GL_POINTS); glVertex3f(x,y,z); glPopMatrix(); how do i get the position of the vertex? i don't want to use own algorithm for this (performance)

Share this post


Link to post
Share on other sites
Eitsch    188
i heard something about "feedback" mode. does anybody know an example/tut?
if this doesn't work: how do i have to multiplicate my vertex with the transformed modelview elements?

thanks

Share this post


Link to post
Share on other sites
Brother Bob    10344
Sure you can, by using the feedback rendering mode. Check out glRenderMode and glFeedbackBuffer.

However, this is not the fastest way to do it, so performancewise, doing it yourself is likely to be faster. Just because OpenGL can do it for you doesn't mean it can do it faster than you can.

Share this post


Link to post
Share on other sites
Eitsch    188
the problem is:
i have to rotate a vehicle round strange axis and a recalculation is really terrible

okay. i will check feedback rendering mode out

thanks

Share this post


Link to post
Share on other sites
Aeluned    196
Given a point, you can perform all transformations on it, then read back the modelview matrix.

The transformed point will reside in the 12,13 & 14 elements of the retrieved modelview matrix.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this