Пример #1
0
 public bool IntersectTriangle(Vec3 trianglePoint1, Vec3 trianglePoint2, Vec3 trianglePoint3, Vec3 triangleNormal, out Vec3 intersectionPoint)
 {
     if (!this.IntersectPlane(triangleNormal, trianglePoint1, out intersectionPoint))
     {
         return(false);
     }
     return(intersectionPoint.WithinTriangle(trianglePoint1, trianglePoint2, trianglePoint3));
 }
Пример #2
0
 public bool IntersectTriangle(Vec3 trianglePoint1, Vec3 trianglePoint2, Vec3 trianglePoint3, Vec3 triangleNormal, out Vec3 intersectionPoint)
 {
     intersectionPoint = this.IntersectPlane(triangleNormal, trianglePoint1);
     return(intersectionPoint.WithinTriangle(trianglePoint1, trianglePoint2, trianglePoint3));
 }