| GeometryHelperGetContact Method |
Computes the ray vs. triangle contact.
Namespace: DigitalRune.GeometryAssembly: DigitalRune.Geometry (in DigitalRune.Geometry.dll) Version: 1.18.0.0 (1.18.2.14427)
Syntax public static bool GetContact(
Ray ray,
Triangle triangle,
bool isTwoSided,
out float hitDistance
)
Public Shared Function GetContact (
ray As Ray,
triangle As Triangle,
isTwoSided As Boolean,
<OutAttribute> ByRef hitDistance As Single
) As Boolean
public:
static bool GetContact(
Ray ray,
Triangle triangle,
bool isTwoSided,
[OutAttribute] float% hitDistance
)
static member GetContact :
ray : Ray *
triangle : Triangle *
isTwoSided : bool *
hitDistance : float32 byref -> bool
Parameters
- ray
- Type: DigitalRune.Geometry.ShapesRay
The ray. - triangle
- Type: DigitalRune.Geometry.ShapesTriangle
The triangle. - isTwoSided
- Type: SystemBoolean
if set to the triangle is treated as a two-sided triangle. Ray
contacts with the back-side of a one-sided triangle are not reported.
- hitDistance
- Type: SystemSingle
The hit distance. This is the distance on the ray from the ray origin to the contact point.
Return Value
Type:
Boolean if the ray hits the triangle; otherwise,
.
See Also