Function Int3PolygonClipper.ClipPolygon
ClipPolygon
(UnsafeSpan<Int3> vIn, int n, UnsafeSpan<Int3> vOut, int multi, int offset, int axis)
Clips a polygon against an axis aligned half plane.
Public
int ClipPolygon (
vIn | Input vertices |
|
int | n | Number of input vertices (may be less than the length of the vIn array) |
vOut | Output vertices, needs to be large enough |
|
int | multi | Scale factor for the input vertices |
int | offset | Offset to move the input vertices with before cutting |
int | axis | Axis to cut along, either x=0, y=1, z=2 |
Clips a polygon against an axis aligned half plane.
Return
Number of output vertices
The vertices will be scaled and then offset, after that they will be cut using either the x axis, y axis or the z axis as the cutting line. The resulting vertices will be added to the vOut array in their original space (i.e before scaling and offsetting).