testPoint function
void
testPoint()
Implementation
void testPoint(
Vector3 point,
int index,
double localThresholdSq,
Matrix4 matrixWorld,
Raycaster raycaster,
List<Intersection> intersects,
Object3D object
) {
final rayPointDistanceSq = _pointsray.distanceSqToPoint(point);
if (rayPointDistanceSq < localThresholdSq) {
final intersectPoint = Vector3.zero();
_pointsray.closestPointToPoint(point, intersectPoint);
intersectPoint.applyMatrix4(matrixWorld);
final distance = raycaster.ray.origin.distanceTo(intersectPoint);
if (distance < raycaster.near || distance > raycaster.far) return;
intersects.add(Intersection(
distance: distance,
distanceToRay: math.sqrt(rayPointDistanceSq),
point: intersectPoint,
index: index,
object: object
));
}
}