This is an optimization proposition.
Quaternions are heavily used during mesh generation and are costly to create and to compute.
This PR uses pre-computed quaternions for the most used operations.
Warning : this somewhat breaks the backward compatibility since the same Quaternion objects are used, requiring shapes to clone them when needed (and not using e.g. xxxLocal() operations ! See impact on existing shapes.
If unacceptable, we will need to clone() each quaternion returned.
This is an optimization proposition. Quaternions are heavily used during mesh generation and are costly to create and to compute. This PR uses pre-computed quaternions for the most used operations.
Warning : this somewhat breaks the backward compatibility since the same Quaternion objects are used, requiring shapes to clone them when needed (and not using e.g. xxxLocal() operations ! See impact on existing shapes. If unacceptable, we will need to clone() each quaternion returned.