add operator* in aiQuaterniont
parent
f6dd11ca1a
commit
b6f8448b78
|
@ -57,6 +57,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
template <typename TReal> class aiVector3t;
|
template <typename TReal> class aiVector3t;
|
||||||
template <typename TReal> class aiMatrix3x3t;
|
template <typename TReal> class aiMatrix3x3t;
|
||||||
|
template <typename TReal> class aiMatrix4x4t;
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
/** Represents a quaternion in a 4D vector. */
|
/** Represents a quaternion in a 4D vector. */
|
||||||
|
|
|
@ -61,7 +61,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
/** Transformation of a quaternion by a 4x4 matrix */
|
/** Transformation of a quaternion by a 4x4 matrix */
|
||||||
template <typename TReal>
|
template <typename TReal>
|
||||||
AI_FORCE_INLINE
|
AI_FORCE_INLINE
|
||||||
aiQuaterniont<TReal> operator * (const aiMatrix4x4t<TReal>& pMatrix, const aiQuaterniont& pQuaternion) {
|
aiQuaterniont<TReal> operator * (const aiMatrix4x4t<TReal>& pMatrix, const aiQuaterniont<TReal>& pQuaternion) {
|
||||||
aiQuaterniont res;
|
aiQuaterniont res;
|
||||||
res.x = pMatrix.a1 * pQuaternion.x + pMatrix.a2 * pQuaternion.y + pMatrix.a3 * pQuaternion.z + pMatrix.a4 * pQuaternion.w;
|
res.x = pMatrix.a1 * pQuaternion.x + pMatrix.a2 * pQuaternion.y + pMatrix.a3 * pQuaternion.z + pMatrix.a4 * pQuaternion.w;
|
||||||
res.y = pMatrix.b1 * pQuaternion.x + pMatrix.b2 * pQuaternion.y + pMatrix.b3 * pQuaternion.z + pMatrix.b4 * pQuaternion.w;
|
res.y = pMatrix.b1 * pQuaternion.x + pMatrix.b2 * pQuaternion.y + pMatrix.b3 * pQuaternion.z + pMatrix.b4 * pQuaternion.w;
|
||||||
|
|
Loading…
Reference in New Issue