www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: KittenKoder on November 03, 2012, 08:33:25 am

Title: Get Object3D Rotation Matrix Question
Post by: KittenKoder on November 03, 2012, 08:33:25 am
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.
Title: Re: Get Object3D Rotation Matrix Question
Post by: 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.... ;)
Title: Re: Get Object3D Rotation Matrix Question
Post by: KittenKoder on November 03, 2012, 09:20:01 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