virtual bool contains(const LinAl::Vector<T, D> &) const;
virtual unsigned get_max_ray_intersections() const { return shape->get_max_ray_intersections(); }
virtual unsigned get_intersections(const Ray<T, D> &, SurfacePoint<T, D> *, unsigned) const;
+ virtual Coverage get_coverage(const BoundingBox<T, D> &) const;
};
template<typename T, unsigned D>
{
unsigned count = shape->get_intersections(ray, points, size);
for(unsigned i=0; i<count; ++i)
+ {
points[i].normal = -points[i].normal;
+ points[i].entry = !points[i].entry;
+ }
return count;
}
+template<typename T, unsigned D>
+inline Coverage Negation<T, D>::get_coverage(const BoundingBox<T, D> &bbox) const
+{
+ Coverage coverage = shape->get_coverage(bbox);
+ if(coverage==FULL_COVERAGE)
+ return NO_COVERAGE;
+ else if(coverage==NO_COVERAGE)
+ return FULL_COVERAGE;
+ else
+ return PARTIAL_COVERAGE;
+}
+
} // namespace Geometry
} // namespace Msp