View Full Version : Inverse matrix
03-11-2005, 10:29 AM
Is there a way to get inverse of GL_MODELVIEW_MATRIX? I am certain hardware has to use it at some point, and I can't believe it has been excluded from the API??
So I am looking for something like glGetFloatv(GL_MODELVIEW_INVERSE_MATRIX) ...
I went through RedBook couple times, but I couldn't find it, am I blind or.. ??
Thanks for help in advance :)
I'm not putting my hand on fire over this, but I don't think it exists. Besides, I don't think it's that hard to write your own inverse routine. You can get the current matrix with:
glGetDoublev(GL_MODELVIEW_MATRIX, modelviewMatrix);Same, for projection and texture.
03-11-2005, 11:25 PM
It is not hard at all, but finding inverse matrix in general can be quite costly, since it involves lots of multiplications. :(
I just can't believe it doesen't exist as part of API. :( ( Oh, well... I guess transposing and translating will have to cut it. :p
Check this (http://cache-www.intel.com/cd/00/00/01/76/17670_24504501.pdf) out. It's from Intel's site and I think you'll find it very interesting.
03-16-2005, 05:32 PM
Take a look at:
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.