Click or drag to resize

PolyLineMetafileCommandIsPointInPolygon Method

Checks if point q is in the polygon built by the numOfPoints points from startIdx on.

Namespace: RAYLASE.Marker.VectorGraphicElement.MetafileCommand
Assembly: RAYLASE.Marker.VectorGraphicElement (in RAYLASE.Marker.VectorGraphicElement.dll) Version: 2.20.0
Syntax
C#
public bool IsPointInPolygon(
	dvec3 point,
	int startIdx = -1,
	int numOfPoints = 0
)

Parameters

point  dvec3
The point to be checked.
startIdx  Int32  (Optional)
The start index in the polygon's point list from which the points are used. If startIdx = -1 the whole polygon including SegmentEndPointPair.Start is used.
numOfPoints  Int32  (Optional)
The number of points to be used for the check. If 0 all points are used.

Return Value

Boolean
True if the point is inside the polygon, false otherwise.
Remarks
The Jordan point-in-polygon-test is used described here: https://de.wikipedia.org/wiki/Punkt-in-Polygon-Test_nach_Jordan. Attention: This method is working only in 2D space! Method CheckIfPointIsInTriangle() is working in 3D space but checks only for a triangle, not for a polygon.
See Also