ReferenceIntersector.FindNearest
Method
Description:
Projects a ray from the origin along the given direction, and returns the nearest reference from intersected elements which match the ReferenceIntersector's criteria.
Projects a ray from the origin along the given direction, and returns the nearest reference from intersected elements which match the ReferenceIntersector's criteria.
Remarks:
Note that FindNearest() is a convenience method, and other references that may be nearly the same distance from the origin can be obtained from Find(XYZ, XYZ).
Note that FindNearest() is a convenience method, and other references that may be nearly the same distance from the origin can be obtained from Find(XYZ, XYZ).
Parameters
Parameter | Type | Description |
---|---|---|
origin | XYZ | The origin of the ray. |
direction | XYZ | The direction of the ray. |
Return Value
Type | Description |
---|---|
ReferenceWithContext | The intersected reference nearest to the ray origin, if none is found |
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | A non-optional argument was null |