Android 3d math library (vector, matrix, etc.), Similar to javax.vecmath.Matrix4f.rotate ()

New for Android here.

Does the SDK have an Android 2.2 3D math library? I could not find him, and I hoped that he would be alone. I can not use javax. * Packages for any reason in Eclipse.

What I really need is a rotation around an arbitrary axis of an arbitrary angle.

I really don't want to use NDK unless I have to. If there is a freely available Java math Java library, I would love to know. It should work with Android.

Ideally, it should have basic 3d math, such as cross (), dot (), etc., as well as arbitrary rotation and scaling.

Thank,

+3
source share
2 answers

I just dropped the vecmath source into my project and it seems to compile and work fine except for the Color * classes (which is not a big loss).

+2
source

The best I could find was the jMonkeyEngine math package . This required some modification to work when separated from the rest of the engine. In particular, you want to keep the classes , , and and remove any methods that depend on classes from other packages. Fortunately, the BSD license makes this possible for any purpose.Matrix*fVector*fQuaternionFastMath

+1
source

Source: https://habr.com/ru/post/1773363/


All Articles