Get Object3D Rotation Matrix Question

Started by KittenKoder, November 03, 2012, 08:33:25 AM

Previous topic - Next topic

KittenKoder

When you call the getRotationMatrix() method does it create a new matrix or return the actual rotation matrix of the object? If it creates a new one each call is there a way to access the actual one for read-only operations?

I am attempting to minimize the creation of Java objects per pass and I need a method of tracking the y rotation of an object for some animation methods, so this has been worrying me a bit.
When life throws you lemons, make lemon juice, then drop life into a pile of razors and pour the lemon juice over it.

EgonOlsen

It returns the internal matrix. I think the docs mention that and state that you shouldn't rely on it...but after all these years, it's save to rely on it.... ;)

KittenKoder

Quote from: EgonOlsen on November 03, 2012, 08:56:14 AM
It returns the internal matrix. I think the docs mention that and state that you shouldn't rely on it...but after all these years, it's save to rely on it.... ;)

Cool, thanks. This will save a lot of headaches.  ;D
When life throws you lemons, make lemon juice, then drop life into a pile of razors and pour the lemon juice over it.