00001
00002
00003 #ifndef __EXTENT_EXPLORER_H
00004 #define __EXTENT_EXPLORER_H
00005
00006 #include <esg/Definitions.h>
00007 #include <esg/explorer/NExtentsExplorer.h>
00008
00009 namespace esg {
00010
00011 class OGSCENE_EXPORT ExtentExplorer : public NExtentsExplorer {
00012 public:
00013 ExtentExplorer (const Vector3& v) : NExtentsExplorer(1)
00014 {
00015 _results = new Interval[1];
00016 _dirs = new Vector3[1];
00017 _trDirs = new Vector3[1];
00018 _translate = new float[1];
00019 _scale = new float[1];
00020
00021 _results[0].max = -MAXFLOAT; _results[0].min = MAXFLOAT;
00022 _dirs[0].set(v.x, v.y, v.z);
00023 _trDirs[0].set(v.x, v.y, v.z);
00024 _translate[0] = 0;
00025 _scale[0] = 1;
00026 }
00027
00028 ExtentExplorer (ESGfloat x, ESGfloat y, ESGfloat z) : NExtentsExplorer(1)
00029 {
00030 _results = new Interval[1];
00031 _dirs = new Vector3[1];
00032 _trDirs = new Vector3[1];
00033 _translate = new float[1];
00034 _scale = new float[1];
00035
00036 _results[0].max = -MAXFLOAT; _results[0].min = MAXFLOAT;
00037 _dirs[0].set(x, y, z);
00038 _trDirs[0].set(x, y, z);
00039 _translate[0] = 0;
00040 _scale[0] = 1;
00041 }
00042
00043 virtual Interval result (unsigned i = 0 ) const {
00044 return _results[0];
00045 }
00046 };
00047
00048 };
00049
00050 #endif // __EXTENT_EXPLORER_H