Math3D.SignedDotProduct C# (CSharp) Méthode

SignedDotProduct() public static méthode

public static SignedDotProduct ( Vector3 vectorA, Vector3 vectorB, Vector3 normal ) : float
vectorA Vector3
vectorB Vector3
normal Vector3
Résultat float
    public static float SignedDotProduct(Vector3 vectorA, Vector3 vectorB, Vector3 normal)
    {
        Vector3 perpVector;
        float dot;

        //Use the geometry object normal and one of the input vectors to calculate the perpendicular vector
        perpVector = Vector3.Cross(normal, vectorA);

        //Now calculate the dot product between the perpendicular vector (perpVector) and the other input vector
        dot = Vector3.Dot(perpVector, vectorB);

        return dot;
    }