Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Loading...
Searching...
No Matches
Math2D library

Enumerations

enum  WindingOrder
 exposed from C++ (do not change) More...

Functions

void ~Math2D ()
static proto bool IsPointInPolygon (notnull array< float > polygon, float x, float y)
 Check if a point is inside polygon.
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.
enum WindingOrder Math2D ()
static proto WindingOrder TriangleWindingXZ (vector a, vector b, vector c)
 Determines winding order of triangle given by points a, b, c.

Variables

 Clockwise
 CounterClockwise
 Invalid

Detailed Description

Enumeration Type Documentation

◆ WindingOrder

exposed from C++ (do not change)

Definition at line 9 of file enmath2d.c.

Function Documentation

◆ ~Math2D()

void ~Math2D ( )
private

◆ IsPointInPolygon()

proto bool IsPointInPolygon ( notnull array< float > polygon,
float x,
float y )
staticprivate

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

References x, and y.

◆ IsPointInPolygonXZ()

proto bool IsPointInPolygonXZ ( notnull array< vector > polygon,
vector point )
staticprivate

Check if a point is inside polygon.

Takes polygon and point only in the XZ plane.

◆ IsPointInTriangleXZ()

proto bool IsPointInTriangleXZ ( vector p1,
vector p2,
vector p3,
vector point )
staticprivate

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

◆ Math2D()

◆ TriangleWindingXZ()

proto WindingOrder TriangleWindingXZ ( vector a,
vector b,
vector c )
staticprivate

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

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

Variable Documentation

◆ Clockwise

Clockwise

Definition at line 1 of file enmath2d.c.

◆ CounterClockwise

CounterClockwise

Definition at line 0 of file enmath2d.c.

◆ Invalid

Invalid

Definition at line 2 of file enmath2d.c.