00001 // Copyright (C) 2008 - 2009 Mathias Froehlich - Mathias.Froehlich@web.de 00002 // 00003 // This library is free software; you can redistribute it and/or 00004 // modify it under the terms of the GNU Library General Public 00005 // License as published by the Free Software Foundation; either 00006 // version 2 of the License, or (at your option) any later version. 00007 // 00008 // This library is distributed in the hope that it will be useful, 00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 // Library General Public License for more details. 00012 // 00013 // You should have received a copy of the GNU General Public License 00014 // along with this program; if not, write to the Free Software 00015 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00016 // 00017 00018 #ifndef BVHVisitor_hxx 00019 #define BVHVisitor_hxx 00020 00021 namespace simgear { 00022 00023 class BVHStaticData; 00024 00025 class BVHGroup; 00026 class BVHTransform; 00027 class BVHMotionTransform; 00028 class BVHStaticGeometry; 00029 class BVHLineGeometry; 00030 00031 class BVHStaticBinary; 00032 class BVHStaticTriangle; 00033 00034 class BVHVisitor { 00035 public: 00036 // The magnitudes of pure virtuals is because of the fact that this chaining 00037 // just takes needless runtime. This declaration should force the user of 00038 // this classes to implement a common functionality that should be called 00039 // from each apropriate apply method directly. 00040 virtual ~BVHVisitor() {} 00041 00042 // High level nodes to handle 00043 virtual void apply(BVHGroup&) = 0; 00044 virtual void apply(BVHTransform&) = 0; 00045 virtual void apply(BVHMotionTransform&) = 0; 00046 virtual void apply(BVHLineGeometry&) = 0; 00047 virtual void apply(BVHStaticGeometry&) = 0; 00048 00049 // Static tree nodes to handle 00050 virtual void apply(const BVHStaticBinary&, const BVHStaticData&) = 0; 00051 virtual void apply(const BVHStaticTriangle&, const BVHStaticData&) = 0; 00052 }; 00053 00054 } 00055 00056 #endif