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 basic 3d math like cross(), dot(), etc. along with arbitrary rotation and scaling.
Thanks,
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
, andFastMath
classes, and remove any methods that depend on classes from other packages. Luckily the BSD license makes this possible for any purpose.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).