how would those extra math functions benefit jME, what extra does it add?
Well matrix 4f wouldn’t have to be re-written for one. They are all very well documented unlike some of jME’s as well. And giving a game developer more options on how to manipulate the math of what’s going on is a good thing. And finally, having variants of lwjgl and Java3d math functions helps support a transition from those libraries to jME, which is the purpose of jME right?
Overall it seems like a “Gain -something-, loose nothing” kind of situation.
And while I was looking over some of the code in Matrix4f, some isn’t even correct like multiplying. It’s not treated like a -4x4 matrix- like the name implies when multiplying happens, but more like a Transform matrix (see the line inside multiply out.matrix = 1;). Don’t call it Matrix4f if it isn’t just a 4x4 matrix.
By using lwjgl src, bugs like this won’t happen.
matrix4f doesn’t need to be rewritten, it just needs updating. Mojo noticed an increase by 30 FPS when he made his own Vector3f class, we were using LWJGL’s before.
30FPS? That’s a lot. Any idea what about LWGJL’s vector class made it so much slower? The basis for this thread was along the lines of assuming theirs was just as good (the src for theirs didn’t look bad).
no idea, sorry. But thats the reason why we are using jME’s rather than LWJGLs.
could you just add the lwgl math classes to your project as needed?
The 30 FPS was a long time ago, like LWJGL 0.5 I believe, and there was object creation issues with LWJGL’s Vector3f class (for how it was being used in jME), I’m sure it’s improved now.
That being said, we have written our math classes to take advantage of how jME’s scene updates are handled (garbage is incredibly low), and have our math classes running at a very decent speed. I feel strongly about Vector3f, Math3f and Quaternion, that they are running as fast as any other out there (if not faster when used in jME).
I’m assuming you are basing your opinion that our math classes are crap on Matrix4f. Well, Matrix4f actually is the one class that wasn’t written by any jME people (although it does have my name on it). It was donated early on for the milkshape loader, and the person who donated simply translated the “Real Soon Now” matrix. We never used it for anything other than milkshape and we never looked at it after it worked for the milkshape.
As we need more math classes (which at the moment there’s nothing needed), we’ll take a look at what LWJGL offers. But, existing jME math classes are optimized for jME, and adding a generic math class to it will not help. Now, your improvements to Matrix4f are fine, because it’s only used for one purpose. It’s probably going away, anyways, after a unified model solution is implemented.
I wasn’t trying to say they are all crap I was trying to be very careful in stating observations not opinions, and making ‘inquisitive suggestions’ rather than ‘know it all facts’, and I’m sorry if I came across that way. I had never seen it as bad to suggest reusing available code, and I can understand why you’re using your own. I’m also sorry if my bug findings and modest suggestions have painted me in a bad light. I’m simply tring to learn a new API, and came across things that didn’t make sense.
Oh no, you misunderstood me. What I meant, in my opinion Matrix4f IS crap, and that might make it appear that the rest are as well. Actually, there is a grammar issue in that line, and I see you might have thought I was angry:
I'm assuming you are basing your opinion that our math classes are crap on Matrix4f
should have been something like:
I'm assuming that based on Matrix4f being crap that our math classes are equally bad.
I was just trying to get the point across that Matrix4f has been largely ignored. While the others have been optimized to work in the jME scenegraph.
I really do appreciate people finding these bugs, especially the ones we never knew to look for (your boundings one for example). I'm guilty of attaching my ego to some things, so it's hard to hear when you screwed up, but it is important and I do appreciate it.
You'll just have to bear with me when you bring up a problem, I'll go into the initial phase of "NUH UH, it works fine." :)
Heh, I think we all do that to some degree.