Share via


Quaternion.BaryCentric(Quaternion,Quaternion,Quaternion,Single,Single) Method (Microsoft.DirectX)

Returns a quaternion in barycentric coordinates.

Definition

Visual Basic Public Shared Function BaryCentric( _
    ByVal q1 As Quaternion, _
    ByVal q2 As Quaternion, _
    ByVal q3 As Quaternion, _
    ByVal f As Single, _
    ByVal g As Single _
) As Quaternion
C# public static Quaternion BaryCentric(
    Quaternion q1,
    Quaternion q2,
    Quaternion q3,
    float f,
    float g
);
C++ public:
static Quaternion BaryCentric(
    Quaternion q1,
    Quaternion q2,
    Quaternion q3,
    float f,
    float g
);
JScript public static function BaryCentric(
    q1 : Quaternion,
    q2 : Quaternion,
    q3 : Quaternion,
    f : float,
    g : float
) : Quaternion;

Parameters

q1 Microsoft.DirectX.Quaternion
Source Quaternion structure.
q2 Microsoft.DirectX.Quaternion
Source Quaternion structure.
q3 Microsoft.DirectX.Quaternion
Source Quaternion structure.
f System.Single
Weighting factor. See Remarks.
g System.Single
Weighting factor. See Remarks.

Return Value

Microsoft.DirectX.Quaternion
Resulting Quaternion structure in barycentric coordinates.

Remarks

To compute the barycentric coordinates, the BaryCentric method implements the following series of spherical linear interpolation operations.

Slerp(Slerp(q1, q2, f + g))

Slerp(q1, q3, f + g)

g/(f + g)

See Also