00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef BVHStaticGeometry_hxx
00019 #define BVHStaticGeometry_hxx
00020
00021 #include <simgear/math/SGGeometry.hxx>
00022 #include <simgear/structure/SGSharedPtr.hxx>
00023
00024 #include "BVHVisitor.hxx"
00025 #include "BVHNode.hxx"
00026 #include "BVHStaticData.hxx"
00027 #include "BVHStaticNode.hxx"
00028
00029 namespace simgear {
00030
00031 class BVHStaticGeometry : public BVHNode {
00032 public:
00033 BVHStaticGeometry(const BVHStaticNode* staticNode,
00034 const BVHStaticData* staticData);
00035 virtual ~BVHStaticGeometry();
00036
00037 virtual void accept(BVHVisitor& visitor);
00038
00039 void traverse(BVHVisitor& visitor) const
00040 { _staticNode->accept(visitor, *_staticData); }
00041
00042 const BVHStaticData* getStaticData() const
00043 { return _staticData; }
00044 const BVHStaticNode* getStaticNode() const
00045 { return _staticNode; }
00046
00047 virtual SGSphered computeBoundingSphere() const;
00048
00049 private:
00050 SGSharedPtr<const BVHStaticNode> _staticNode;
00051 SGSharedPtr<const BVHStaticData> _staticData;
00052 };
00053
00054 }
00055
00056 #endif