6

is there a java library which can handle quaternions and matrices (quaternion matrix multiplication) with all the standard operations?

(i searched google and here before - but didnt find any adequate solution)

Erick Robertson
  • 32,125
  • 13
  • 69
  • 98
manfred reichelt
  • 137
  • 1
  • 3
  • 9

3 Answers3

3

The Jave3D javax.vecmath package has quaternions support (Quat4D) and quite a lot of the most common operations are supported. It also has matrix operations that can be applied to quaternions.

You will probably find that it fits most of your needs - and it should not be too hard to add any additional operations if you need them.

mikera
  • 105,238
  • 25
  • 256
  • 415
1

There is also JME3's Quaternion. JME3 classes' interface and javadoc is substandard. Also it uses float precision everywhere. I would only use it if performance is an issue, for example in a game.

DPM
  • 1,960
  • 3
  • 26
  • 49
0

Apache has Quaternion support in org.apache.commons.math3.complex. It seems to have the usual required operations.

Hephaestus
  • 4,337
  • 5
  • 35
  • 48