Table of Contents

Method CollidesWith

Namespace
GeometryHelper.Core
Assembly
GeometryHelper.dll

CollidesWith(GeoAabb3, GeoAabb3)

Checks whether two axis-aligned boxes overlap, using the default tolerance.

public static bool CollidesWith(GeoAabb3 box1, GeoAabb3 box2)

Parameters

box1 GeoAabb3
box2 GeoAabb3

Returns

bool

CollidesWith(GeoAabb3, GeoAabb3, Tolerance)

Checks whether two axis-aligned boxes overlap, within a tolerance.

public static bool CollidesWith(GeoAabb3 box1, GeoAabb3 box2, Tolerance tolerance)

Parameters

box1 GeoAabb3
box2 GeoAabb3
tolerance Tolerance

Returns

bool

CollidesWith(GeoObb3, GeoObb3)

Checks whether two oriented boxes overlap, using the default tolerance.

public static bool CollidesWith(GeoObb3 box1, GeoObb3 box2)

Parameters

box1 GeoObb3
box2 GeoObb3

Returns

bool

CollidesWith(GeoObb3, GeoObb3, Tolerance)

Checks whether two oriented boxes overlap, within a tolerance.

public static bool CollidesWith(GeoObb3 box1, GeoObb3 box2, Tolerance tolerance)

Parameters

box1 GeoObb3

The first box.

box2 GeoObb3

The second box.

tolerance Tolerance

The tolerance; boxes closer than this count as touching.

Returns

bool

true if the boxes overlap or touch; otherwise, false.

Remarks

This is the separating axis theorem. Two convex shapes miss each other exactly when some direction exists along which their shadows do not overlap, and for a pair of boxes it is enough to try fifteen directions: the three axes of each box, and the nine cross products pairing one axis from each. The first six catch a face separating them and the last nine catch an edge, the case where two boxes pass by each other at an angle with no face facing the gap.

CollidesWith(GeoLine3, GeoObb3)

Checks whether a line segment reaches into an oriented box, using the default tolerance.

public static bool CollidesWith(GeoLine3 line, GeoObb3 box)

Parameters

line GeoLine3
box GeoObb3

Returns

bool

CollidesWith(GeoLine3, GeoObb3, Tolerance)

Checks whether a line segment reaches into an oriented box, within a tolerance.

public static bool CollidesWith(GeoLine3 line, GeoObb3 box, Tolerance tolerance)

Parameters

line GeoLine3
box GeoObb3
tolerance Tolerance

Returns

bool

CollidesWith(GeoTriangle3, GeoTriangle3)

Checks whether two triangles overlap, using the default tolerance.

public static bool CollidesWith(GeoTriangle3 triangle1, GeoTriangle3 triangle2)

Parameters

triangle1 GeoTriangle3
triangle2 GeoTriangle3

Returns

bool

CollidesWith(GeoTriangle3, GeoTriangle3, Tolerance)

Checks whether two triangles overlap, within a tolerance.

public static bool CollidesWith(GeoTriangle3 triangle1, GeoTriangle3 triangle2, Tolerance tolerance)

Parameters

triangle1 GeoTriangle3
triangle2 GeoTriangle3
tolerance Tolerance

Returns

bool

Remarks

Two triangles that are not coplanar can only meet along a line, so it is enough to ask whether any edge of one pierces the other. Coplanar triangles meet across an area instead and that test finds nothing, so they are handled separately by looking for a vertex of one inside the other or for a pair of edges crossing.

CollidesWith(GeoSolid3, GeoSolid3)

Checks whether two solids overlap, using the default tolerance.

public static bool CollidesWith(GeoSolid3 solid1, GeoSolid3 solid2)

Parameters

solid1 GeoSolid3
solid2 GeoSolid3

Returns

bool

CollidesWith(GeoSolid3, GeoSolid3, Tolerance)

Checks whether two solids overlap, within a tolerance.

public static bool CollidesWith(GeoSolid3 solid1, GeoSolid3 solid2, Tolerance tolerance)

Parameters

solid1 GeoSolid3

The first solid.

solid2 GeoSolid3

The second solid.

tolerance Tolerance

The tolerance.

Returns

bool

true if the solids share any space; otherwise, false.

Remarks

Two closed bodies overlap in one of exactly two ways: their surfaces cross, or one sits wholly inside the other with no surface contact at all. The first is found by testing the surface triangles against each other, the second by testing a single vertex of each body against the other, which settles it because a body that is inside without touching is entirely inside. Bounding boxes are checked first, since that rejects most pairs before any triangle is touched.

CollidesWith(GeoObb3, GeoSolid3)

Checks whether an oriented box overlaps a solid, using the default tolerance.

public static bool CollidesWith(GeoObb3 box, GeoSolid3 solid)

Parameters

box GeoObb3
solid GeoSolid3

Returns

bool

CollidesWith(GeoObb3, GeoSolid3, Tolerance)

Checks whether an oriented box overlaps a solid, within a tolerance.

public static bool CollidesWith(GeoObb3 box, GeoSolid3 solid, Tolerance tolerance)

Parameters

box GeoObb3
solid GeoSolid3
tolerance Tolerance

Returns

bool

CollidesWith(GeoObb3, GeoAabb3)

Checks whether an oriented box overlaps an axis-aligned one, using the default tolerance.

public static bool CollidesWith(GeoObb3 box1, GeoAabb3 box2)

Parameters

box1 GeoObb3
box2 GeoAabb3

Returns

bool

CollidesWith(GeoObb3, GeoAabb3, Tolerance)

Checks whether an oriented box overlaps an axis-aligned one, within a tolerance.

public static bool CollidesWith(GeoObb3 box1, GeoAabb3 box2, Tolerance tolerance)

Parameters

box1 GeoObb3
box2 GeoAabb3
tolerance Tolerance

Returns

bool

Remarks

An axis-aligned box is an oriented box that happens to line up with the world, so this is the same separating axis test with one of the two frames already known.

CollidesWith(GeoLine3, GeoAabb3)

Checks whether a line segment reaches into an axis-aligned box, using the default tolerance.

public static bool CollidesWith(GeoLine3 line, GeoAabb3 box)

Parameters

line GeoLine3
box GeoAabb3

Returns

bool

CollidesWith(GeoLine3, GeoAabb3, Tolerance)

Checks whether a line segment reaches into an axis-aligned box, within a tolerance.

public static bool CollidesWith(GeoLine3 line, GeoAabb3 box, Tolerance tolerance)

Parameters

line GeoLine3
box GeoAabb3
tolerance Tolerance

Returns

bool

CollidesWith(GeoLine3, GeoSolid3)

Checks whether a line segment reaches into a solid, using the default tolerance.

public static bool CollidesWith(GeoLine3 line, GeoSolid3 solid)

Parameters

line GeoLine3
solid GeoSolid3

Returns

bool

CollidesWith(GeoLine3, GeoSolid3, Tolerance)

Checks whether a line segment reaches into a solid, within a tolerance.

public static bool CollidesWith(GeoLine3 line, GeoSolid3 solid, Tolerance tolerance)

Parameters

line GeoLine3
solid GeoSolid3
tolerance Tolerance

Returns

bool

Remarks

A segment lying wholly inside the body touches it without crossing its surface, so containment is checked as well as crossing.

CollidesWith(GeoPolyline3, GeoSolid3)

Checks whether a polyline reaches into a solid, using the default tolerance.

public static bool CollidesWith(GeoPolyline3 polyline, GeoSolid3 solid)

Parameters

polyline GeoPolyline3
solid GeoSolid3

Returns

bool

CollidesWith(GeoPolyline3, GeoSolid3, Tolerance)

Checks whether a polyline reaches into a solid, within a tolerance.

public static bool CollidesWith(GeoPolyline3 polyline, GeoSolid3 solid, Tolerance tolerance)

Parameters

polyline GeoPolyline3
solid GeoSolid3
tolerance Tolerance

Returns

bool

CollidesWith(GeoPolygon3, GeoSolid3)

Checks whether a polygon overlaps a solid, using the default tolerance.

public static bool CollidesWith(GeoPolygon3 polygon, GeoSolid3 solid)

Parameters

polygon GeoPolygon3
solid GeoSolid3

Returns

bool

CollidesWith(GeoPolygon3, GeoSolid3, Tolerance)

Checks whether a polygon overlaps a solid, within a tolerance.

public static bool CollidesWith(GeoPolygon3 polygon, GeoSolid3 solid, Tolerance tolerance)

Parameters

polygon GeoPolygon3
solid GeoSolid3
tolerance Tolerance

Returns

bool

Remarks

A flat region and a body meet in one of two ways: their surfaces cross, or the region lies wholly within the body without touching its boundary. The first is found by testing the triangles of each against the other, the second by testing one point of the region.

CollidesWith(GeoPolygon3, GeoObb3)

Checks whether a polygon overlaps an oriented box, using the default tolerance.

public static bool CollidesWith(GeoPolygon3 polygon, GeoObb3 box)

Parameters

polygon GeoPolygon3
box GeoObb3

Returns

bool

CollidesWith(GeoPolygon3, GeoObb3, Tolerance)

Checks whether a polygon overlaps an oriented box, within a tolerance.

public static bool CollidesWith(GeoPolygon3 polygon, GeoObb3 box, Tolerance tolerance)

Parameters

polygon GeoPolygon3
box GeoObb3
tolerance Tolerance

Returns

bool

CollidesWith(GeoFace3, GeoSolid3)

Checks whether a face overlaps a solid, using the default tolerance.

public static bool CollidesWith(GeoFace3 face, GeoSolid3 solid)

Parameters

face GeoFace3
solid GeoSolid3

Returns

bool

CollidesWith(GeoFace3, GeoSolid3, Tolerance)

Checks whether a face overlaps a solid, within a tolerance.

public static bool CollidesWith(GeoFace3 face, GeoSolid3 solid, Tolerance tolerance)

Parameters

face GeoFace3
solid GeoSolid3
tolerance Tolerance

Returns

bool

Remarks

Only the outer boundary of the face is tested. A hole is material that is not there, so a body reaching a face only through one of its holes touches nothing — but a face whose holes were ignored would report a collision that is not real. The boundary test is therefore the conservative one, and is refined by asking whether the meeting place is over a hole.

CollidesWith(GeoLine3, GeoPlane3)

Determines whether a segment touches a plane.

public static bool CollidesWith(GeoLine3 line, GeoPlane3 plane)

Parameters

line GeoLine3
plane GeoPlane3

Returns

bool

CollidesWith(GeoLine3, GeoPlane3, Tolerance)

Determines whether a segment touches a plane, within a tolerance.

public static bool CollidesWith(GeoLine3 line, GeoPlane3 plane, Tolerance tolerance)

Parameters

line GeoLine3
plane GeoPlane3
tolerance Tolerance

Returns

bool

Remarks

A plane is endless, so this is not a crossing test: a segment lying in the plane touches it along its whole length and crosses it nowhere. The two ends decide it — either one on the plane, or one each side of it.

CollidesWith(GeoLine3, GeoTriangle3)

Determines whether a segment touches a triangle.

public static bool CollidesWith(GeoLine3 line, GeoTriangle3 triangle)

Parameters

line GeoLine3
triangle GeoTriangle3

Returns

bool

CollidesWith(GeoLine3, GeoTriangle3, Tolerance)

Determines whether a segment touches a triangle, within a tolerance.

public static bool CollidesWith(GeoLine3 line, GeoTriangle3 triangle, Tolerance tolerance)

Parameters

line GeoLine3
triangle GeoTriangle3
tolerance Tolerance

Returns

bool

CollidesWith(GeoLine3, GeoPolygon3)

Determines whether a segment touches a polygon.

public static bool CollidesWith(GeoLine3 line, GeoPolygon3 polygon)

Parameters

line GeoLine3
polygon GeoPolygon3

Returns

bool

CollidesWith(GeoLine3, GeoPolygon3, Tolerance)

Determines whether a segment touches a polygon, within a tolerance.

public static bool CollidesWith(GeoLine3 line, GeoPolygon3 polygon, Tolerance tolerance)

Parameters

line GeoLine3
polygon GeoPolygon3
tolerance Tolerance

Returns

bool

Exceptions

ArgumentNullException

Thrown when the polygon is null.

CollidesWith(GeoLine3, GeoFace3)

Determines whether a segment touches a face.

public static bool CollidesWith(GeoLine3 line, GeoFace3 face)

Parameters

line GeoLine3
face GeoFace3

Returns

bool

CollidesWith(GeoLine3, GeoFace3, Tolerance)

Determines whether a segment touches a face, within a tolerance.

public static bool CollidesWith(GeoLine3 line, GeoFace3 face, Tolerance tolerance)

Parameters

line GeoLine3
face GeoFace3
tolerance Tolerance

Returns

bool

Remarks

A segment passing over a hole of the face touches nothing, because the crossing test reads the holes as the absences they are.

Exceptions

ArgumentNullException

Thrown when the face is null.

CollidesWith(GeoRay3, GeoTriangle3)

Determines whether a ray runs into a triangle.

public static bool CollidesWith(GeoRay3 ray, GeoTriangle3 triangle)

Parameters

ray GeoRay3
triangle GeoTriangle3

Returns

bool

CollidesWith(GeoRay3, GeoTriangle3, Tolerance)

Determines whether a ray runs into a triangle, within a tolerance.

public static bool CollidesWith(GeoRay3 ray, GeoTriangle3 triangle, Tolerance tolerance)

Parameters

ray GeoRay3
triangle GeoTriangle3
tolerance Tolerance

Returns

bool

CollidesWith(GeoRay3, GeoPolygon3)

Determines whether a ray runs into a polygon.

public static bool CollidesWith(GeoRay3 ray, GeoPolygon3 polygon)

Parameters

ray GeoRay3
polygon GeoPolygon3

Returns

bool

CollidesWith(GeoRay3, GeoPolygon3, Tolerance)

Determines whether a ray runs into a polygon, within a tolerance.

public static bool CollidesWith(GeoRay3 ray, GeoPolygon3 polygon, Tolerance tolerance)

Parameters

ray GeoRay3
polygon GeoPolygon3
tolerance Tolerance

Returns

bool

Exceptions

ArgumentNullException

Thrown when the polygon is null.

CollidesWith(GeoRay3, GeoFace3)

Determines whether a ray runs into a face.

public static bool CollidesWith(GeoRay3 ray, GeoFace3 face)

Parameters

ray GeoRay3
face GeoFace3

Returns

bool

CollidesWith(GeoRay3, GeoFace3, Tolerance)

Determines whether a ray runs into a face, within a tolerance.

public static bool CollidesWith(GeoRay3 ray, GeoFace3 face, Tolerance tolerance)

Parameters

ray GeoRay3
face GeoFace3
tolerance Tolerance

Returns

bool

Exceptions

ArgumentNullException

Thrown when the face is null.

CollidesWith(GeoRay3, GeoAabb3)

Determines whether a ray starts inside an axis-aligned box or runs into it.

public static bool CollidesWith(GeoRay3 ray, GeoAabb3 box)

Parameters

ray GeoRay3
box GeoAabb3

Returns

bool

CollidesWith(GeoRay3, GeoAabb3, Tolerance)

Determines whether a ray starts inside an axis-aligned box or runs into it, within a tolerance.

public static bool CollidesWith(GeoRay3 ray, GeoAabb3 box, Tolerance tolerance)

Parameters

ray GeoRay3
box GeoAabb3
tolerance Tolerance

Returns

bool

CollidesWith(GeoRay3, GeoObb3)

Determines whether a ray starts inside an oriented box or runs into it.

public static bool CollidesWith(GeoRay3 ray, GeoObb3 box)

Parameters

ray GeoRay3
box GeoObb3

Returns

bool

CollidesWith(GeoRay3, GeoObb3, Tolerance)

Determines whether a ray starts inside an oriented box or runs into it, within a tolerance.

public static bool CollidesWith(GeoRay3 ray, GeoObb3 box, Tolerance tolerance)

Parameters

ray GeoRay3
box GeoObb3
tolerance Tolerance

Returns

bool

CollidesWith(GeoAabb3, GeoSolid3)

Determines whether an axis-aligned box touches or overlaps a solid.

public static bool CollidesWith(GeoAabb3 box, GeoSolid3 solid)

Parameters

box GeoAabb3
solid GeoSolid3

Returns

bool

CollidesWith(GeoAabb3, GeoSolid3, Tolerance)

Determines whether an axis-aligned box touches or overlaps a solid, within a tolerance.

public static bool CollidesWith(GeoAabb3 box, GeoSolid3 solid, Tolerance tolerance)

Parameters

box GeoAabb3
solid GeoSolid3
tolerance Tolerance

Returns

bool

Remarks

An axis-aligned box is an oriented box whose axes happen to be the world's, so this is the oriented answer and not an approximation of it.

Exceptions

ArgumentNullException

Thrown when the solid is null.

CollidesWith(GeoPolyline3, GeoPlane3)

Determines whether a straight chain touches a plane.

public static bool CollidesWith(GeoPolyline3 polyline, GeoPlane3 plane)

Parameters

polyline GeoPolyline3
plane GeoPlane3

Returns

bool

CollidesWith(GeoPolyline3, GeoPlane3, Tolerance)

Determines whether a straight chain touches a plane, within a tolerance.

public static bool CollidesWith(GeoPolyline3 polyline, GeoPlane3 plane, Tolerance tolerance)

Parameters

polyline GeoPolyline3

The chain.

plane GeoPlane3

The shape to test against.

tolerance Tolerance

The tolerance.

Returns

bool

true when any of its segments touches; otherwise, false.

Exceptions

ArgumentNullException

Thrown when the chain is null.

CollidesWith(GeoPolyline3, GeoLine3)

Determines whether a straight chain touches a segment.

public static bool CollidesWith(GeoPolyline3 polyline, GeoLine3 line)

Parameters

polyline GeoPolyline3
line GeoLine3

Returns

bool

CollidesWith(GeoPolyline3, GeoLine3, Tolerance)

Determines whether a straight chain touches a segment, within a tolerance.

public static bool CollidesWith(GeoPolyline3 polyline, GeoLine3 line, Tolerance tolerance)

Parameters

polyline GeoPolyline3

The chain.

line GeoLine3

The shape to test against.

tolerance Tolerance

The tolerance.

Returns

bool

true when any of its segments touches; otherwise, false.

Exceptions

ArgumentNullException

Thrown when the chain is null.

CollidesWith(GeoPolyline3, GeoRay3)

Determines whether a straight chain touches a ray.

public static bool CollidesWith(GeoPolyline3 polyline, GeoRay3 ray)

Parameters

polyline GeoPolyline3
ray GeoRay3

Returns

bool

CollidesWith(GeoPolyline3, GeoRay3, Tolerance)

Determines whether a straight chain touches a ray, within a tolerance.

public static bool CollidesWith(GeoPolyline3 polyline, GeoRay3 ray, Tolerance tolerance)

Parameters

polyline GeoPolyline3

The chain.

ray GeoRay3

The shape to test against.

tolerance Tolerance

The tolerance.

Returns

bool

true when any of its segments touches; otherwise, false.

Exceptions

ArgumentNullException

Thrown when the chain is null.

CollidesWith(GeoPolyline3, GeoArc3)

Determines whether a straight chain touches an arc.

public static bool CollidesWith(GeoPolyline3 polyline, GeoArc3 arc)

Parameters

polyline GeoPolyline3
arc GeoArc3

Returns

bool

CollidesWith(GeoPolyline3, GeoArc3, Tolerance)

Determines whether a straight chain touches an arc, within a tolerance.

public static bool CollidesWith(GeoPolyline3 polyline, GeoArc3 arc, Tolerance tolerance)

Parameters

polyline GeoPolyline3

The chain.

arc GeoArc3

The shape to test against.

tolerance Tolerance

The tolerance.

Returns

bool

true when any of its segments touches; otherwise, false.

Exceptions

ArgumentNullException

Thrown when the chain is null.

CollidesWith(GeoPolyline3, GeoCircle3)

Determines whether a straight chain touches a circle.

public static bool CollidesWith(GeoPolyline3 polyline, GeoCircle3 circle)

Parameters

polyline GeoPolyline3
circle GeoCircle3

Returns

bool

CollidesWith(GeoPolyline3, GeoCircle3, Tolerance)

Determines whether a straight chain touches a circle, within a tolerance.

public static bool CollidesWith(GeoPolyline3 polyline, GeoCircle3 circle, Tolerance tolerance)

Parameters

polyline GeoPolyline3

The chain.

circle GeoCircle3

The shape to test against.

tolerance Tolerance

The tolerance.

Returns

bool

true when any of its segments touches; otherwise, false.

Exceptions

ArgumentNullException

Thrown when the chain is null.

CollidesWith(GeoPolyline3, GeoTriangle3)

Determines whether a straight chain touches a triangle.

public static bool CollidesWith(GeoPolyline3 polyline, GeoTriangle3 triangle)

Parameters

polyline GeoPolyline3
triangle GeoTriangle3

Returns

bool

CollidesWith(GeoPolyline3, GeoTriangle3, Tolerance)

Determines whether a straight chain touches a triangle, within a tolerance.

public static bool CollidesWith(GeoPolyline3 polyline, GeoTriangle3 triangle, Tolerance tolerance)

Parameters

polyline GeoPolyline3

The chain.

triangle GeoTriangle3

The shape to test against.

tolerance Tolerance

The tolerance.

Returns

bool

true when any of its segments touches; otherwise, false.

Exceptions

ArgumentNullException

Thrown when the chain is null.

CollidesWith(GeoPolyline3, GeoPolygon3)

Determines whether a straight chain touches a polygon.

public static bool CollidesWith(GeoPolyline3 polyline, GeoPolygon3 polygon)

Parameters

polyline GeoPolyline3
polygon GeoPolygon3

Returns

bool

CollidesWith(GeoPolyline3, GeoPolygon3, Tolerance)

Determines whether a straight chain touches a polygon, within a tolerance.

public static bool CollidesWith(GeoPolyline3 polyline, GeoPolygon3 polygon, Tolerance tolerance)

Parameters

polyline GeoPolyline3

The chain.

polygon GeoPolygon3

The shape to test against.

tolerance Tolerance

The tolerance.

Returns

bool

true when any of its segments touches; otherwise, false.

Exceptions

ArgumentNullException

Thrown when the chain is null.

CollidesWith(GeoPolyline3, GeoFace3)

Determines whether a straight chain touches a face.

public static bool CollidesWith(GeoPolyline3 polyline, GeoFace3 face)

Parameters

polyline GeoPolyline3
face GeoFace3

Returns

bool

CollidesWith(GeoPolyline3, GeoFace3, Tolerance)

Determines whether a straight chain touches a face, within a tolerance.

public static bool CollidesWith(GeoPolyline3 polyline, GeoFace3 face, Tolerance tolerance)

Parameters

polyline GeoPolyline3

The chain.

face GeoFace3

The shape to test against.

tolerance Tolerance

The tolerance.

Returns

bool

true when any of its segments touches; otherwise, false.

Exceptions

ArgumentNullException

Thrown when the chain is null.

CollidesWith(GeoPolyline3, GeoObb3)

Determines whether a straight chain touches a box.

public static bool CollidesWith(GeoPolyline3 polyline, GeoObb3 box)

Parameters

polyline GeoPolyline3
box GeoObb3

Returns

bool

CollidesWith(GeoPolyline3, GeoObb3, Tolerance)

Determines whether a straight chain touches a box, within a tolerance.

public static bool CollidesWith(GeoPolyline3 polyline, GeoObb3 box, Tolerance tolerance)

Parameters

polyline GeoPolyline3

The chain.

box GeoObb3

The shape to test against.

tolerance Tolerance

The tolerance.

Returns

bool

true when any of its segments touches; otherwise, false.

Exceptions

ArgumentNullException

Thrown when the chain is null.

CollidesWith(GeoPolyline3, GeoAabb3)

Determines whether a straight chain touches a square box.

public static bool CollidesWith(GeoPolyline3 polyline, GeoAabb3 box)

Parameters

polyline GeoPolyline3
box GeoAabb3

Returns

bool

CollidesWith(GeoPolyline3, GeoAabb3, Tolerance)

Determines whether a straight chain touches a square box, within a tolerance.

public static bool CollidesWith(GeoPolyline3 polyline, GeoAabb3 box, Tolerance tolerance)

Parameters

polyline GeoPolyline3

The chain.

box GeoAabb3

The shape to test against.

tolerance Tolerance

The tolerance.

Returns

bool

true when any of its segments touches; otherwise, false.

Exceptions

ArgumentNullException

Thrown when the chain is null.

CollidesWith(GeoPolyline3, GeoPolyline3)

Determines whether two straight chains touch.

public static bool CollidesWith(GeoPolyline3 polyline, GeoPolyline3 other)

Parameters

polyline GeoPolyline3
other GeoPolyline3

Returns

bool

CollidesWith(GeoPolyline3, GeoPolyline3, Tolerance)

Determines whether two straight chains touch, within a tolerance.

public static bool CollidesWith(GeoPolyline3 polyline, GeoPolyline3 other, Tolerance tolerance)

Parameters

polyline GeoPolyline3

The first chain.

other GeoPolyline3

The second chain.

tolerance Tolerance

The tolerance.

Returns

bool

true when they meet anywhere, whether at a place or along a length; otherwise, false.

Remarks

Two segments lying along each other meet along a length and cross nowhere, so this is not the crossing test with the place thrown away.

Exceptions

ArgumentNullException

Thrown when either chain is null.

CollidesWith(GeoRay3, GeoSolid3)

Determines whether a ray starts inside a solid or runs into it.

public static bool CollidesWith(GeoRay3 ray, GeoSolid3 solid)

Parameters

ray GeoRay3
solid GeoSolid3

Returns

bool

CollidesWith(GeoRay3, GeoSolid3, Tolerance)

Determines whether a ray starts inside a solid or runs into it, within a tolerance.

public static bool CollidesWith(GeoRay3 ray, GeoSolid3 solid, Tolerance tolerance)

Parameters

ray GeoRay3
solid GeoSolid3
tolerance Tolerance

Returns

bool

Remarks

A ray leaving from inside the body never crosses its surface on the way out of nothing, so where it starts is asked before any face is tried.

CollidesWith(GeoLine3, GeoLine3)

Determines whether two segments touch.

public static bool CollidesWith(GeoLine3 line1, GeoLine3 line2)

Parameters

line1 GeoLine3
line2 GeoLine3

Returns

bool

CollidesWith(GeoLine3, GeoLine3, Tolerance)

Determines whether two segments touch, within a tolerance.

public static bool CollidesWith(GeoLine3 line1, GeoLine3 line2, Tolerance tolerance)

Parameters

line1 GeoLine3

The first segment.

line2 GeoLine3

The second segment.

tolerance Tolerance

The tolerance.

Returns

bool

true when they meet, whether at a point or along a length; false when they are apart or skew.

CollidesWith(GeoLine3, GeoRay3)

Determines whether a segment touches a ray.

public static bool CollidesWith(GeoLine3 line, GeoRay3 ray)

Parameters

line GeoLine3
ray GeoRay3

Returns

bool

CollidesWith(GeoLine3, GeoRay3, Tolerance)

Determines whether a segment touches a ray, within a tolerance.

public static bool CollidesWith(GeoLine3 line, GeoRay3 ray, Tolerance tolerance)

Parameters

line GeoLine3

The segment.

ray GeoRay3

The ray.

tolerance Tolerance

The tolerance.

Returns

bool

true when they meet, whether at a point or along a length; otherwise, false.

CollidesWith(GeoRay3, GeoLine3)

Determines whether a ray touches a segment.

public static bool CollidesWith(GeoRay3 ray, GeoLine3 line)

Parameters

ray GeoRay3
line GeoLine3

Returns

bool

CollidesWith(GeoRay3, GeoLine3, Tolerance)

Determines whether a ray touches a segment, within a tolerance.

public static bool CollidesWith(GeoRay3 ray, GeoLine3 line, Tolerance tolerance)

Parameters

ray GeoRay3

The ray.

line GeoLine3

The segment.

tolerance Tolerance

The tolerance.

Returns

bool

true when they meet, whether at a point or along a length; otherwise, false.