Beispiel #1
0
        /// <summary>
        /// Converts a normal vector of the current instance of <see cref="PlaneF"/> into a unit vector.
        /// </summary>
        /// <returns>The length of the plane normal vector.</returns>
        public float Normalize()
        {
            Vector3F normal = Normal;
            float    length = normal.Normalize();

            Normal = normal;
            return(length);
        }
Beispiel #2
0
        /// <summary>
        /// Converts a normal vector of the current instance of <see cref="PlaneF"/> into a unit vector and returns the resulting plane.
        /// </summary>
        /// <returns>The plane with normalized normal vector.</returns>
        public PlaneF GetNormalize()
        {
            PlaneF   result;
            Vector3F normal = Normal;

            normal.Normalize();
            result.A = normal.X;
            result.B = normal.Y;
            result.C = normal.Z;
            result.D = D;
            return(result);
        }
Beispiel #3
0
 public void GetDirection(out Vector3F result)
 {
     Vector3F.Subtract(ref Point2, ref Point1, out result);
     result.Normalize();
 }