]> git.mxchange.org Git - simgear.git/blobdiff - simgear/scene/bvh/BVHLineSegmentVisitor.hxx
accomodate changes to osgDB::DatabasePager interface
[simgear.git] / simgear / scene / bvh / BVHLineSegmentVisitor.hxx
index aec9c0813ab730bd46d5ae31a9442a39f90e97e6..cca02588bbdf1a571cebff938b71ab2cc8d890aa 100644 (file)
@@ -23,6 +23,7 @@
 #include <simgear/scene/material/mat.hxx>
 
 #include "BVHVisitor.hxx"
+#include "BVHNode.hxx"
 
 namespace simgear {
 
@@ -33,6 +34,7 @@ public:
         _lineSegment(lineSegment),
         _time(t),
         _material(0),
+        _id(0),
         _haveHit(false)
     { }
     virtual ~BVHLineSegmentVisitor()
@@ -54,6 +56,8 @@ public:
     { return _angularVelocity; }
     const SGMaterial* getMaterial() const
     { return _material; }
+    BVHNode::Id getId() const
+    { return _id; }
 
     virtual void apply(BVHGroup& group);
     virtual void apply(BVHTransform& transform);
@@ -62,11 +66,10 @@ public:
     virtual void apply(BVHStaticGeometry& node);
     
     virtual void apply(const BVHStaticBinary&, const BVHStaticData&);
-    virtual void apply(const BVHStaticLeaf&, const BVHStaticData&);
     virtual void apply(const BVHStaticTriangle&, const BVHStaticData&);
     
 protected:
-    bool setLineSegmentEnd(const SGVec3d& end)
+    void setLineSegmentEnd(const SGVec3d& end)
     {
         // Ok, you need to make sure that the new end is in the previous
         // direction and that the line segment is not enlarged by that call.
@@ -85,6 +88,7 @@ private:
     SGVec3d _linearVelocity;
     SGVec3d _angularVelocity;
     const SGMaterial* _material;
+    BVHNode::Id _id;
     
     bool _haveHit;
 };