View Full Version : Rotate vector

09-05-2000, 09:21 AM
Hello all. I know openGL takes care of the gimbol lock problem with their rotation functions, but is there an easy way to use openGL to rotate an arbitrary vector? The reason why is, I'm doing my own lighting, and I want to rotate the direction of the light. Gimbol lock is rearing its ugly head, and I don't want to learn quaternions right now, and maybe never. Can openGL rotate this for me?

09-07-2000, 02:29 PM
There are ways to get back rotated vertices but like most "read-functions" this is not fast and stalls the pipeline....But No fear guy you donīt have to learn about Quaternions to solve your problem....Just get your ModelviewMatrix(with glGet()) and then multiply your vector by this matrix and voila you have your nicely rotated vector....