Пример #1
0
 /// <summary>
 /// Returns true if the ray hits the triangle within the supplied
 /// parameter interval and before the parameter value contained
 /// in the supplied hit. Detailed information about the hit is
 /// returned in the supplied hit. In order to obtain all potential
 /// hits, the supplied hit can be initialized with RayHit3d.MaxRange.
 /// </summary>
 public bool Hits(Triangle3d triangle, double tmin, double tmax, ref RayHit3d hit)
 => HitsTrianglePointAndEdges(
     triangle.P0, triangle.Edge01, triangle.Edge02,
     tmin, tmax, ref hit);
Пример #2
0
 /// <summary>
 /// Returns true if the ray hits the triangle before the parameter
 /// value contained in the supplied hit. Detailed information about
 /// the hit is returned in the supplied hit.
 /// </summary>
 public bool Hits(Triangle3d triangle, ref RayHit3d hit)
 => HitsTrianglePointAndEdges(
     triangle.P0, triangle.Edge01, triangle.Edge02,
     double.MinValue, double.MaxValue, ref hit);