Quaternion.Slerp Method (Quaternion, Quaternion, Double, Boolean)

 

Interpolates between orientations, represented as Quaternion structures, using spherical linear interpolation.

Namespace:   System.Windows.Media.Media3D
Assembly:  PresentationCore (in PresentationCore.dll)

public static Quaternion Slerp(
	Quaternion from,
	Quaternion to,
	double t,
	bool useShortestPath
)

Parameters

from
Type: System.Windows.Media.Media3D.Quaternion

Quaternion that represents the starting orientation.

to
Type: System.Windows.Media.Media3D.Quaternion

Quaternion that represents the ending orientation.

t
Type: System.Double

Interpolation coefficient.

useShortestPath
Type: System.Boolean

Boolean that indicates whether to compute quaternions that constitute the shortest possible arc on a four-dimensional unit sphere.

Return Value

Type: System.Windows.Media.Media3D.Quaternion

Quaternion that represents the orientation resulting from the interpolation.

Spherical linear interpolation is useful for animating a three-dimensional models because it provides smooth transitions between different orientations of the model.

.NET Framework
Available since 3.0
Return to top
Show: