Example #1
0
        internal static Ray GetTestRayInPlane(Vector3 origin, Vector3 normal)
        {
            var v1 = normal.IsAlmostEqualTo(Vector3.XAxis) ? Vector3.YAxis : Vector3.XAxis;
            var d  = v1.Cross(normal);

            return(new Ray(origin, d));
        }
Example #2
0
 public Line(Vector3 start, Vector3 end)
 {
     if (start.IsAlmostEqualTo(end))
     {
         throw new ArgumentException($"The line could not be created. The start and end points of the line cannot be the same: start {start}, end {end}");
     }
     this.Start = start;
     this.End   = end;
 }