Collection of utility functions
Classes
Methods
-
<static> getQuadFromPoints(pt1,, eraserRadius)
-
This function constructs a rectangle around point P1P2 with width the rectangle will be tilted the same angle as the P1P2 B________A | P1 | | | | | | | | | | |P2| C D
Parameters:
Name Type Description pt1,
pt2 - the endpoints of the quad
eraserRadius
The radius to expand the quad with
Returns:
the QuadPoint
-
<static> isPointInQuad(qp, testpt)
-
This function will return true if the specified point
testpt
is in the quadParameters:
Name Type Description qp
the quadpoint to check within.
testpt
Point to check for
Returns:
- A bool indicating if the point is in the quad
-
<static> returnPointThatIntersectsQuad(qp, pt1,)
-
This function will return the specific points that intersect the given quad and the line segment. Note that if there are two points of intersections, the closest point to
pt1
will be the first point in the vector.Parameters:
Name Type Description qp
the quadpoint to check within.
pt1,
pt2 - Points that define the line segment to check against the quad
Returns:
- A vector that contains at most two points of intersection
-
<static> splitInkListBetween(inklist, splitpoint, inklistpos)
-
This function will split the specified inklist by the specified point. The specified point will remain on the old inklist and the new inklist will be added to the end of the inklist array.
Parameters:
Name Type Description inklist
the array of inklist arrays.
splitpoint
the point within the array to split the list by
inklistpos
the position within the
inklist
array.Returns:
the newly created array