OcclusionTester.h

Go to the documentation of this file.
00001 
00005 /* Copyright © 2009, 2010 James Legg.
00006     This program is free software: you can redistribute it and/or modify
00007     it under the terms of the GNU General Public License as published by
00008     the Free Software Foundation, either version 3 of the License, or
00009     (at your option) any later version.
00010 */
00011 #ifndef LIBTRACK_OCCLUSION_TESTER_H
00012 #define LIBTRACK_OCCLUSION_TESTER_H
00013 
00014 #include <LinearMath/btScalar.h>
00015 
00016 #include "AxisAlignedBoundingBox.h"
00017 
00018 namespace Track
00019 {
00020 
00027 class OcclusionTester
00028 {
00029 public:
00031     enum ViewState
00032     {
00033         VS_OUT = 0, 
00034         VS_IN = 1, 
00035         VS_PARTIAL = 2, 
00036     };
00037     OcclusionTester();
00038     virtual ~OcclusionTester();
00042     btVector3 plane_vectors[5];
00045     btScalar plane_distances[5];
00047     ViewState operator ()(const AxisAlignedBoundingBox & aabb) const;
00048 protected:
00050     inline bool in_half_space(const btVector3 & point, const unsigned plane_index) const;
00051 };
00052 
00053 } // namespace Track
00054 
00055 #endif /*LIBTRACK_OCCLUSION_TESTER_H*/

Get Racer at SourceForge.net. Fast, secure and Free Open Source software downloads

Generated at Mon Sep 6 00:41:11 2010 by Doxygen version 1.4.7 for Racer version svn335.