#include "BVHNode.hxx"
#include "BVHGroup.hxx"
+#include "BVHPageNode.hxx"
#include "BVHTransform.hxx"
#include "BVHLineGeometry.hxx"
#include "BVHStaticGeometry.hxx"
return;
leaf.traverse(*this);
}
+ virtual void apply(BVHPageNode& leaf)
+ {
+ if (!intersects(_sphere, leaf.getBoundingSphere()))
+ return;
+ leaf.traverse(*this);
+ }
virtual void apply(BVHTransform& transform)
{
if (!intersects(_sphere, transform.getBoundingSphere()))
{ return _linearVelocity; }
const SGVec3d& getAngularVelocity() const
{ return _angularVelocity; }
- const SGMaterial* getMaterial() const
+ const BVHMaterial* getMaterial() const
{ return _material; }
BVHNode::Id getId() const
{ return _id; }
SGVec3d _point;
SGVec3d _linearVelocity;
SGVec3d _angularVelocity;
- const SGMaterial* _material;
+ const BVHMaterial* _material;
BVHNode::Id _id;
bool _havePoint;