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
eraserRadiusThe radius to expand the quad with
Returns:
the QuadPoint
-
<static> isPointInQuad(qp, testpt)
-
This function will return true if the specified point
testptis in the quadParameters:
Name Type Description qpthe quadpoint to check within.
testptPoint 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
pt1will be the first point in the vector.Parameters:
Name Type Description qpthe 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 inklistthe array of inklist arrays.
splitpointthe point within the array to split the list by
inklistposthe position within the
inklistarray.Returns:
the newly created array