raycast method

  1. @override
void raycast(
  1. Raycaster raycaster,
  2. List<Intersection> intersects
)
override

Get intersections between a casted Ray and this LOD Raycaster.intersectObject will call this method.

Implementation

@override
	void raycast(Raycaster raycaster, List<Intersection> intersects){
		final levels = this.levels;
		if (levels.isNotEmpty) {
			_v1.setFromMatrixPosition(matrixWorld);
			final distance = raycaster.ray.origin.distanceTo( _v1 );
			getObjectForDistance(distance)?.raycast( raycaster, intersects );
		}
	}