PolyK Class
Based on the Polyk library http://polyk.ivank.net released under MIT licence. This is an amazing lib! Slightly modified by Mat Groves (matgroves.com);
Item Index
Methods
Methods
_convex
()
Boolean
private
Checks whether a shape is convex
Returns:
Boolean:
_PointInTriangle
(
Boolean
private
-
px -
py -
ax -
ay -
bx -
by -
cx -
cy
Checks whether a point is within a triangle
Parameters:
-
pxNumberx coordinate of the point to test
-
pyNumbery coordinate of the point to test
-
axNumberx coordinate of the a point of the triangle
-
ayNumbery coordinate of the a point of the triangle
-
bxNumberx coordinate of the b point of the triangle
-
byNumbery coordinate of the b point of the triangle
-
cxNumberx coordinate of the c point of the triangle
-
cyNumbery coordinate of the c point of the triangle
Returns:
Boolean:
Triangulate
()
Triangulates shapes for webGL graphic fills.
