Author Topic: Get Object3D Rotation Matrix Question  (Read 856 times)

Offline KittenKoder

  • int
  • **
  • Posts: 66
  • I Am No One Else
    • View Profile
    • Kitt Games Wiki
Get Object3D Rotation Matrix Question
« 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.
When life throws you lemons, make lemon juice, then drop life into a pile of razors and pour the lemon juice over it.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Get Object3D Rotation Matrix Question
« Reply #1 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.... ;)

Offline KittenKoder

  • int
  • **
  • Posts: 66
  • I Am No One Else
    • View Profile
    • Kitt Games Wiki
Re: Get Object3D Rotation Matrix Question
« Reply #2 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
When life throws you lemons, make lemon juice, then drop life into a pile of razors and pour the lemon juice over it.