src/Elements/Geometry/Transform.cs
/// <summary>
/// Transform a vector into the coordinate space defined by this transform.
/// </summary>
/// <param name="vector">The vector to transform.</param>
/// <returns>A new vector transformed by this transform.</returns>
Transform a vector into the coordinate space defined by this transform.
Transform a vector into the coordinate space defined by this transform .
public Vector3 OfVector(Vector3 vector)
        {
            var m = new Matrix(this.XAxis, this.YAxis, this.ZAxis, this.Origin);
            return new Vector3(
                vector.X * m.XAxis.X + vector.Y * YAxis.X + vector.Z * ZAxis.X + this.Origin.X,
                vector.X * m.XAxis.Y + vector.Y * YAxis.Y + vector.Z * ZAxis.Y + this.Origin.Y,
                vector.X * m.XAxis.Z + vector.Y * YAxis.Z + vector.Z * ZAxis.Z + this.Origin.Z
            );
        }
public Vector3 OfVector ( Vector3 vector ) { var m = new Matrix ( this . XAxis , this . YAxis , this . ZAxis , this . Origin ) ; return new Vector3 ( vector . X * m . XAxis . X + vector . Y * YAxis . X + vector . Z * ZAxis . X + this . Origin . X , vector . X * m . XAxis . Y + vector . Y * YAxis . Y + vector . Z * ZAxis . Y + this . Origin . Y , vector . X * m . XAxis . Z + vector . Y * YAxis . Z + vector . Z * ZAxis . Z + this . Origin . Z ) ; }
Transform a vector into the coordinate space defined by this transform.
Transform a vector into the coordinate space defined by this transform .
A new vector transformed by this transform.
A new vector transformed by this transform .
vector
Vector3
The vector to transform.
The vector to transform .