Enfusion Script API
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
Math2D Interface Reference

Static Public Member Functions

static proto bool IsPointInPolygonXZ (notnull array< vector > polygon, vector point)
 Check if a point is inside polygon.
 
static proto bool IsPointInTriangleXZ (vector p1, vector p2, vector p3, vector point)
 Check if point is inside triangle specified by points p1, p2 and p3.
 
static proto bool IsPointInPolygon (notnull array< float > polygon, float x, float y)
 Check if a point is inside polygon.
 
static proto WindingOrder TriangleWindingXZ (vector a, vector b, vector c)
 Determines winding order of triangle given by points a, b, c.
 

Member Function Documentation

◆ IsPointInPolygon()

static proto bool Math2D.IsPointInPolygon ( notnull array< float polygon,
float  x,
float  y 
)
static

Check if a point is inside polygon.

Parameters
polygonMust be an array of Vector2, every two consecutive floats represent one point in polygon.
xX coordinate of point to test
yY coordinate of point to test

◆ IsPointInPolygonXZ()

static proto bool Math2D.IsPointInPolygonXZ ( notnull array< vector polygon,
vector  point 
)
static

Check if a point is inside polygon.

Takes polygon and point only in the XZ plane.

◆ IsPointInTriangleXZ()

static proto bool Math2D.IsPointInTriangleXZ ( vector  p1,
vector  p2,
vector  p3,
vector  point 
)
static

Check if point is inside triangle specified by points p1, p2 and p3.

◆ TriangleWindingXZ()

static proto WindingOrder Math2D.TriangleWindingXZ ( vector  a,
vector  b,
vector  c 
)
static

Determines winding order of triangle given by points a, b, c.

If the triangles form a line, WindingOrder.INVALID is returned.


The documentation for this interface was generated from the following file: