Shape.setTransformMv() is called for each renderer frame and for each shape, involving 6 Matrix4f.mul() and set*() operations. Since mutation of shape's position, rotation or scale is less frequent than rendering one frame (for all shapes), it is more efficient to maintain a local Matrix4f and update it on such single mutations. Rendering then only needs to perform one Matrix4f.mul() operation using this internal matrix. Also change name from setTransformMv(PMVMatrix4f) to transformMvTo(PMVMatrix4f), as its name might be misleading. +++ Group/Scene's uses temp arrays for Z oder sorting, which should be maintained locally to avoid too many temp object creations.
commmit a883f3e2e1563736df32573141fd5119f0678c92 Modified Shape.setTransformMv() as described. Renamed Shape.setTransformMv(PMVMatrix4f) to applyMatToMv(PMVMatrix4f)
commit bf096870c73898963558bef5c9d75760f9f76290 Bug 1490 - GraphUI Performance: Group/Scene: Use temp sorted arrays
commit daf9ae20ebc45c851bc3b8384f4cee3cded8d9dc (HEAD -> master) Add missing rename Shape.transformMvTo() -> applyMatToMv(), an transformMvTo() was an intermediate rename (oops)