Suggestions for math classes in JME 2.0

First of all I'd suggest a seperate category Suggestions -> JME2.0 in the forum.



I think JME2.0 is our chance to get some of the "grown" and confusing things right, especially in jme.math



Here some small suggestions:

  • Matrix3f.transpose() should return a new Matrix, else use Matrix3f.transposeLocal()
  • Matrix3f.add(Matrix3f) should return a new Matrix, new function addLocal(Matrix3f)
  • separate unit test classes for Matrix3f and Matrix4f
  • fixed versions of Vector2/3f and Matrix3/4f (derived from the mutable classes, but all changing operations blocked)
Landei said:

- fixed versions of Vector2/3f and Matrix3/4f (derived from the mutable classes, but all changing operations blocked)


And the X_AXIS, Y_AXIS etc. should be these "fixed" types.
Landei said:

- fixed versions of Vector2/3f and Matrix3/4f (derived from the mutable classes, but all changing operations blocked)

That's impossible - they have public fields :| - we would need some major changes to math stuff to allow for immutable vectors, matrices etc.

Having object pool handling built into math classes instead of creating new objects would be nice.

irrisor said:

Landei said:

- fixed versions of Vector2/3f and Matrix3/4f (derived from the mutable classes, but all changing operations blocked)

That's impossible - they have public fields :| - we would need some major changes to math stuff to allow for immutable vectors, matrices etc.


I started going down this route for 2.0, but stopped for more pressing matters, so it looks like our initial public release of 2.0 will still have this "issue"...