Matrix4f change

If there are no objections, I would like to make the matrix array in Matrix4f protected instead of private so I can extend it to add some functionality for the new camera class.



Just a thought, but for speed sake, you may want to implement the underlying array similar to how I changed Matrix3f… accessing arrays forces an index sanity check by java for each access… many such accesses can be cause a noticeable slowness.

On the other hand, it depends on how often this class is used per frame. It may end up that it is clearer to leave as an array of arrays and is not accessed enough to matter.

my 2c’s

I have no objections.

It will be accessed a lot. I’ll take a look at Matrix3f.



I’m changing Matrix4f to work like Matrix3f. Never fear, I’ll test all the demos to make sure they keep working. I will also let everyone know before I commit it, so, if anyone else would like to test it before ‘commitment’ they can.

Tedium at its finest. :slight_smile:


Well, Matrix3f and Matrix4f should definately act the same, so those changes are needed. I was going to do it myself, but since you’re tackleing it. :slight_smile:


I finished changing Matrix4f to work more like Matrix3f.

It seems to be working, although not too many things use it. Mark I emailed a copy to you for inspection. If anybody else wants to take a look at it before I commit it let me know and I’ll send it to you. Sorry for my paranoia, changing a matrix class makes me a little nervous. :slight_smile:

If I don’t hear anything to the contrary, I can check it in this evening.


That’s what unit tests are for. :slight_smile:

I did get the change and I’ll commit it as soon as I can. Been really busy at work lately (I think they are trying to kill me).

looking over shoulder