View Full Version : Get Coordinates of Transformed Geometry
03-26-2005, 04:28 AM
Get Coordinates of Transformed Geometry?
So how can I get the Coordinates of my rotated vertex? is this possible or do i have to calculate the position myself (would be very slow)?
thank you H.Stony
There are several other threads talking about that.
03-27-2005, 07:15 AM
sorry..i found nothing really useful
i found something about "feedback mode". are there tutorials on it?
03-29-2005, 02:49 AM
I'm not sure, but maybe if you multiply the coordinates of the vertex by the rotated modelview matrix...
03-29-2005, 09:54 AM
that was also my first idea: which are the elements in the matrix to multiplicate? the last row? ....but
i found a sgi example. in the example they use the feedback mode but i didn't find tutorials on it - only the example is hard to understand.
03-30-2005, 12:42 AM
First retrieve the current modelview matrix:
Then do the following to transform your vertex:
float xp = mv * x + mv * y + mv * z + mv;
float yp = mv * x + mv * y + mv * z + mv;
float zp = mv * x + mv * y + mv * z + mv;
float wp = mv * x + mv * y + mv * z + mv;
xp /= wp;
yp /= wp;
zp /= wp;
03-31-2005, 10:29 PM
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.