Vector/matrix math library for the NDK?

557 views
Skip to first unread message

Johan

unread,
Nov 2, 2009, 10:54:23 AM11/2/09
to android-ndk
I'm looking for a good vector/matrix math library that's compatible
with the Android NDK. Configurable Math Library (http://
sourceforge.net/projects/cmldev/) seems good, but requires STL.

Are there any good C++ vector/matrix math libs out there that don't
require STL? Alternatively, has anyone gotten STL working properly
under the NDK yet? (STLPort etc)

fadden

unread,
Nov 3, 2009, 4:02:31 PM11/3/09
to android-ndk
What does "good" mean in this context? You want a large set of
functions with exact results, or something that takes shortcuts to get
results more quickly? (Put another way: scientific / rendering app,
or game engine?)

Johan

unread,
Nov 4, 2009, 4:44:22 AM11/4/09
to android-ndk
Game engine-ish. :-) That is, high performance, accuracy not vital. It
should be floating point though. But I don't need a full-blown game/3d
engine, just the vector math.

Clapfoot

unread,
Nov 4, 2009, 9:00:35 AM11/4/09
to android-ndk
Unless you don't care about having your game run on most Android
handsets out there at the moment (G1, Magic, Hero, etc), I suggest you
use fixed point math since those handsets don't support hardware
floating point.

able353

unread,
Nov 5, 2009, 5:42:04 PM11/5/09
to android-ndk
An STLPort for android can be found on John Ripley's site : http://umbel.mooo.com/
It doesn't provides C++ RTTI or exceptions support but works fine with
NDK 1.6 (cygwin or linux)
HTH - Philippe Le Becq


> ... Alternatively, has anyone gottenSTLworking properly

Johan

unread,
Nov 6, 2009, 6:10:55 AM11/6/09
to android-ndk
Clapfoot: Oh, wasn't aware of that. Know of any fixed point vector
math libs?

Clapfoot

unread,
Nov 6, 2009, 9:25:18 AM11/6/09
to android-ndk
I don't know of any existing c fixed point math libraries, but I'm
sure it wouldn't be hard to google for one. I suggest writing your own
to familiarize yourself with fixed point math. It took me about 1-2
evenings to write the vector/matrix math routines required for my
project.

Pradip Bhattacharya

unread,
Nov 6, 2009, 7:26:11 AM11/6/09
to android-ndk
Johan,
You can check out vincent opengles implementation. It has a good
implementation of fixed routines.
Reply all
Reply to author
Forward
0 new messages