coverage method

double coverage(
  1. Vector3 cameraPosition
)

This volume's coverage at cameraPosition, 0..1 (before weight).

Implementation

double coverage(Vector3 cameraPosition) {
  final b = bounds;
  if (b == null) return 1.0;
  final dist = b.distanceTo(cameraPosition);
  if (blendDistance <= 0) return dist <= 0 ? 1.0 : 0.0;
  final c = 1.0 - dist / blendDistance;
  return c.clamp(0.0, 1.0);
}