/// <summary> /// Determines if there is an intersection between the current object and a triangle. /// </summary> /// <param name="vertex1">The first vertex of the triangle to test.</param> /// <param name="vertex2">The second vertex of the triangle to test.</param> /// <param name="vertex3">The third vertex of the triangle to test.</param> /// <param name="point">When the method completes, contains the point of intersection, /// or <see cref="MyVector3.Zero"/> if there was no intersection.</param> /// <returns>Whether the two objects intersected.</returns> public bool Intersects(ref MyVector3 vertex1, ref MyVector3 vertex2, ref MyVector3 vertex3, out MyVector3 point) { return(MyCollision.RayIntersectsTriangle(ref this, ref vertex1, ref vertex2, ref vertex3, out point)); }
/// <summary> /// Determines if there is an intersection between the current object and a triangle. /// </summary> /// <param name="vertex1">The first vertex of the triangle to test.</param> /// <param name="vertex2">The second vertex of the triangle to test.</param> /// <param name="vertex3">The third vertex of the triangle to test.</param> /// <param name="distance">When the method completes, contains the distance of the intersection, /// or 0 if there was no intersection.</param> /// <returns>Whether the two objects intersected.</returns> public bool Intersects(ref MyVector3 vertex1, ref MyVector3 vertex2, ref MyVector3 vertex3, out float distance) { return(MyCollision.RayIntersectsTriangle(ref this, ref vertex1, ref vertex2, ref vertex3, out distance)); }