Reintroduce quaternions into Blaze

Issue #1 new
Klaus Iglberger created an issue

Description

Since Blaze 1.0 quaternions were provided as unofficial feature. However, due to negligence, lack of proper testing and since the feature was never officially supported the Quaternion class removed in Blaze 2.4. It should be reintroduced with full compatibility to existing vectors and matrices and equipped with test cases.

Tasks

  • reintroduce the Quaternion class template
  • provide a full class documentation
  • ensure compatibility with all existing vector and matrix classes
  • guarantee maximum performance for all operations
  • add test cases for the entire Quaternion functionality

Comments (9)

  1. Matthias Moulin

    Related to the topic: rotation order should ideally be configurable to clockwise or counterclockwise direction

    Furthermore beside the relevant operator overloads, it would be nice to have the following member/free functions:

    • dot
    • conj
    • inv
    • normalize
    • norm
    • sqrNorm
    • quaternion constructor accepting a (normalized) rotation axis and rotation angle
    • quaternion to (normalized) rotation axis and rotation angle
    • quaternion constructor accepting a 3x3 rotation matrix
    • quaternion to 3x3 rotation matrix (explicit?) cast operator
    • quaternion constructor accepting Roll Pitch Yaw angles (and ordering enum value?)
    • quaternion (and ordering enum value?) to Roll Pitch Yaw angles
  2. Elia

    I would put my strong support for adding Quaternions, which are fairly important for gamedev. I am working on a custom game engine and was seriously considering using Blaze for its adoption of modern C++ but lack of quaternions and rotational matrices is a deal-breaker.

  3. Mikhail Katliar

    In a code using Blaze it would be convenient not to depend on an extra library to do quaternion math and avoid conversions to/from Blaze types. I vote for quaternions in Blaze too.

  4. Orell Garten

    I would love to use quaternions as well and would be willing to give it a try. I assume checking out the existing code in Blaze2.4 would be a good start to re-implement them or is this a waste of time due to too many changes to vectors/matrices since then?

  5. Christoph Statz

    Hi @Klaus Iglberger , are there any news regarding this issue? Is there any way we can help you getting this (re-) implemented? Thanks!

  6. Log in to comment