Axiom.Math.Quaternion.Dot C# (CSharp) Method

Dot() public method

Performs a Dot Product operation on 2 Quaternions.
public Dot ( Quaternion quat ) : Real
quat Quaternion
return Real
		public Real Dot( Quaternion quat )
		{
			return this.w * quat.w + this.x * quat.x + this.y * quat.y + this.z * quat.z;
		}

Usage Example

Beispiel #1
0
		public static Quaternion Nlerp( Real fT, Quaternion rkP, Quaternion rkQ, bool shortestPath )
		{
			Quaternion result;
			var fCos = rkP.Dot( rkQ );
			if ( fCos < 0.0f && shortestPath )
			{
				result = rkP + fT*( ( -rkQ ) - rkP );
			}
			else
			{
				result = rkP + fT*( rkQ - rkP );
			}
			result.Normalize();
			return result;
		}
All Usage Examples Of Axiom.Math.Quaternion::Dot