Method HitTest
- Namespace
- GeometryHelper.Dxf
- Assembly
- GeometryHelper.dll
HitTest(GeoPoint3, GeoVector3)
Gets the cell a point hits, as AutoCAD's HitTest: the point carried along the direction it is seen in onto the
table's plane, then laid on its columns and rows from Position along Direction, as
GetCellExtents(int, int, bool) lays them; a cell of a block of merged cells gives the block's top left.
On the table of columns 40 and 30 wide and rows 10, 8 and 8 high at (300, -100, 0), seen from above, (350, -112, 5)
hits the cell (1, 1) and (310, -105, 0) the title (0, 0); a point on the line between two cells, within
Default, hits the one of the lower row or column index, above where the rows flow down and
below where they flow up, and a point beyond the table hits nothing.
public DxfTableHitTestInfo HitTest(GeoPoint3 point, GeoVector3 viewVector)
Parameters
pointGeoPoint3The point, in world coordinates.
viewVectorGeoVector3The direction the point is seen in, of some length; one along the table's plane takes the point where it is, which hits the table only where it lies in its plane.
Returns
- DxfTableHitTestInfo
The cell hit, of Cell, or None with the row and the column -1.
Exceptions
- ArgumentException
Thrown when the point or the direction is not finite, or the direction has no length.