// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
+#include <simgear/math/SGMath.hxx>
#include "BVHLineSegmentVisitor.hxx"
#include <simgear/math/SGGeometry.hxx>
#include "BVHStaticData.hxx"
#include "BVHStaticNode.hxx"
-#include "BVHStaticLeaf.hxx"
#include "BVHStaticTriangle.hxx"
#include "BVHStaticBinary.hxx"
SGVec3d localEnd = _lineSegment.getEnd();
_lineSegment.set(lineSegment.getStart(), toWorld.xformPt(localEnd));
_normal = toWorld.xformVec(_normal);
+ if (!_id)
+ _id = transform.getId();
} else {
_lineSegment = lineSegment;
_haveHit = haveHit;
node.traverse(*this, data, _lineSegment.getStart());
}
-void
-BVHLineSegmentVisitor::apply(const BVHStaticLeaf& node,
- const BVHStaticData& data)
-{
-}
-
void
BVHLineSegmentVisitor::apply(const BVHStaticTriangle& triangle,
const BVHStaticData& data)
_linearVelocity = SGVec3d::zeros();
_angularVelocity = SGVec3d::zeros();
_material = data.getMaterial(triangle.getMaterialIndex());
+ _id = 0;
_haveHit = true;
}