geolib2
HeightMap.h
Go to the documentation of this file.
1 #ifndef GEOLIB_HEIGHT_MAP_H_
2 #define GEOLIB_HEIGHT_MAP_H_
3 
4 #include "Shape.h"
5 #include "HeightMapNode.h"
6 #include "Box.h"
7 
8 #include <vector>
9 
10 namespace geo {
11 
15 class HeightMap : public Shape {
16 
17 public:
18 
19  HeightMap();
20 
21  HeightMap(const HeightMap& orig);
22 
23  virtual ~HeightMap();
24 
25  HeightMap* clone() const;
26 
27  bool intersect(const Ray &, float t0, float t1, double& distance) const;
28 
35  static HeightMap fromGrid(const std::vector<std::vector<double> >& grid, double resolution);
36 
37 protected:
38 
39  //double resolution_;
40 
42 
54  unsigned int mx_min, unsigned int my_min,
55  unsigned int mx_max, unsigned int my_max, double resolution);
56 
57 };
58 
59 }
60 
61 #endif
Shape.h
geo::HeightMap::fromGrid
static HeightMap fromGrid(const std::vector< std::vector< double > > &grid, double resolution)
fromGrid: instantiate a Heightmap from a grid
Definition: HeightMap.cpp:34
geo::HeightMap::HeightMap
HeightMap()
Definition: HeightMap.cpp:7
geo::HeightMapNode
Definition: HeightMapNode.h:17
geo
Definition: Box.h:6
geo::HeightMap
A geometric description of a Heightmap using a quad tree.
Definition: HeightMap.h:15
vector
geo::HeightMap::createQuadTree
static HeightMapNode * createQuadTree(const std::vector< std::vector< double > > &map, unsigned int mx_min, unsigned int my_min, unsigned int mx_max, unsigned int my_max, double resolution)
createQuadTree: divide a grid over a quad tree
Definition: HeightMap.cpp:194
geo::HeightMap::intersect
bool intersect(const Ray &, float t0, float t1, double &distance) const
intersect: currently always throws a logic error
Definition: HeightMap.cpp:27
geo::Ray
Definition: Ray.h:10
geo::HeightMap::clone
HeightMap * clone() const
Definition: HeightMap.cpp:23
Box.h
geo::HeightMap::~HeightMap
virtual ~HeightMap()
Definition: HeightMap.cpp:19
HeightMapNode.h
geo::HeightMap::root_
HeightMapNode * root_
Definition: HeightMap.h:41
geo::Shape
A geometric description of a shape.
Definition: Shape.h:19