#include "BVHSubTreeCollector.hxx"
#include <simgear/math/SGGeometry.hxx>
+#include <cassert>
#include "BVHNode.hxx"
#include "BVHGroup.hxx"
return;
SGSphered sphere = _sphere;
- _sphere = transform.sphereToLocal(sphere, transform.getReferenceTime());
+ _sphere = transform.sphereToLocal(sphere, transform.getStartTime());
_sphere.expandBy(transform.sphereToLocal(sphere, transform.getEndTime()));
NodeList parentNodeList;
BVHSubTreeCollector::apply(const BVHStaticTriangle& node,
const BVHStaticData& data)
{
- if (!intersects(_sphere, node.computeBoundingBox(data)))
+ if (!intersects(_sphere, node.getTriangle(data)))
return;
_staticNode = &node;
}