@Override
public void intersect(int index, Ray3 ray, IntersectionRecorder recorder) {
Interval I = recorder.interval();
do {
NearestIntersectionRecorder rec = new NearestIntersectionRecorder(I);
super.intersect(index, ray, rec);
if (rec.isEmpty()) {
break;
}
Intersection x = rec.nearestIntersection();
MinimalShadingContext ctx = new MinimalShadingContext(Random.DEFAULT);
x.prepareShadingContext(ctx);
Point2 uv = ctx.getUV();
if (trim.opacity(new Point2(uv.x(), 1.0 - uv.y())) > 0.5) {
recorder.record(x);