Click or drag to resize

CTINiLocateTriangle Method

Get the index of the triangle containing X, Y.

Namespace:  Geosoft.Desktop.GXNetX
Assembly:  geosoft.desktop.gxnetx (in geosoft.desktop.gxnetx.dll) Version: 2024.2.0.25
Syntax
public int iLocateTriangle(
	int t,
	double x,
	double y
)

public int iLocateTriangle(
	int t,
	double x,
	double y
)

Parameters

t
Type: SystemInt32
Seed triangle (can be iDummy or <0)
x
Type: SystemDouble
Target X location
y
Type: SystemDouble
Target Y location

Return Value

Type: Int32
The index of the triangle containing X, Y.
Remarks
Index returned begins at 0, but could be negative. -1: If X,Y is not contained in a triangle (or triangle not found) -2: If the location is on an edge This is for "fall-back" purposes only. Frequently edge positions are located as being part of a triangle, so do not rely on this result to determine if a node position is on an edge. -3: If the location is a vertex. This is for "fall-back" purposes only in the code. Normal operation is to include a node position inside a triangle, so do not rely on this result to determine if a node position is input.
See Also