TensorMath.isInRectangle
FunctionChecks for each 2D point whether it is inside of a rectangle.
- Available on all platforms
Platform details: Snapchat, SPECS, Camera Kit Web, Camera Kit Mobile fully supported.
isInRectangle(
points,pointsShape,rect,output):void
Checks for each 2D point whether it is inside of a rectangle.
points - Float32Array of size (point count * 2). 2D points to check
pointsShape - Should be {2, point count, 1}
rect - 2D rectangle points will be checked against
output - Uint8Array of size (point count). For each point, this will be filled with 1 if the point is inside the rectangle, or 0 otherwise.
Parameters
Returns
void