Android 3d math library (vector, matrix, etc.) similar to javax.vecmath.Matrix4f.rotate()
New to Android here.
Is there an Android 2.2 3D math library in the SDK? I couldn't find one and I was hoping there would be one. I am not able to use javax.* packages for some reason in Eclipse.
The thing I really need is rotation about an arbitrary axis of an arbitrary angle.
I don't really want to use the NDK unless I am forced to. If there is a freely available Java 3d math library, I would love to know. It should work with Android.
It should ideally have开发者_Python百科 basic 3d math like cross(), dot(), etc. along with arbitrary rotation and scaling.
Thanks,
I just dropped the vecmath source in to my project and it seems to compile and work fine apart from Color* classes (which is no great loss).
The best I could find was the math package of jMonkeyEngine. It required some modification to work in separation from the rest of the engine. Specifically you only want to keep Matrix*f
, Vector*f
, Quaternion
, and FastMath
classes, and remove any methods that depend on classes from other packages. Luckily the BSD license makes this possible for any purpose.
精彩评论