return !link.hidden() && (link.alpha() > 0.0 || link.hasLabel());
} else if (agent instanceof Patch3D) {
// Patch3D supports the alpha variable, so check Patch3D
// before checking the regular Patch.
Patch3D patch = (Patch3D) agent;
return patch.alpha() > 0.0 || patch.hasLabel();
} else if (agent instanceof Patch) {
// We will assume all patches are visible. However, perhaps
// we should only return true for non-black patches.
return true;