intersectObject4 method

void intersectObject4(
  1. Object3D object,
  2. Raycaster raycaster,
  3. List<Intersection> intersects,
  4. bool recursive,
)

Implementation

void intersectObject4(Object3D object, Raycaster raycaster, List<Intersection> intersects, bool recursive) {
  if (object.layers.test(raycaster.layers)) {
    object.raycast(raycaster, intersects);
  }

  if (recursive == true) {
    var children = object.children;

    for (var i = 0, l = children.length; i < l; i++) {
      intersectObject4(children[i], raycaster, intersects, true);
    }
  }
}