Commit 8b9794d0 authored by Lukas Werner's avatar Lukas Werner
Browse files

Added toggleable block AABB intersection prechecking

parent 51eec69f
Pipeline #6905 canceled with stage
......@@ -253,10 +253,12 @@ void Raytracer::rayTrace(const size_t timestep) const {
body_closest = NULL;
for (auto blockIt = forest_->begin(); blockIt != forest_->end(); ++blockIt) {
// blockIt->getAABB();
/*const AABB& blockAabb = blockIt->getAABB();
if (!intersects(blockAabb, ray, t)) {
continue;
}*/
#ifndef DISABLE_BLOCK_AABB_INTERSECTION_PRECHECK
const AABB& blockAabb = blockIt->getAABB();
if (!intersects(blockAabb, ray, t)) {
continue;
}
#endif
for (auto bodyIt = LocalBodyIterator::begin(*blockIt, storageID_); bodyIt != LocalBodyIterator::end(); ++bodyIt) {
bool intersects = SingleCast<BodyTypeTuple, IntersectsFunctor, bool>::execute(*bodyIt, func);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment