Privacy
An open-source, flexible 3D physical simulation framework
VertexBufferTerrain.h
Go to the documentation of this file.
1 /*
2  * Copyright 2012, DFKI GmbH Robotics Innovation Center
3  *
4  * This file is part of the MARS simulation framework.
5  *
6  * MARS is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU Lesser General Public License
8  * as published by the Free Software Foundation, either version 3
9  * of the License, or (at your option) any later version.
10  *
11  * MARS is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with MARS. If not, see <http://www.gnu.org/licenses/>.
18  *
19  */
20 
21 /*
22  * VertexBufferTerrain.h
23  * General to inherit from.
24  *
25  * Created by Roemmermann on 15.05.12.
26  */
27 
28 #ifndef MARS_GRAPHICS_VERTEX_BUFFER_TERRAIN_H
29 #define MARS_GRAPHICS_VERTEX_BUFFER_TERRAIN_H
30 
31 // On MS Windows MultiResHeightMapRenderer.h needs to be included before
32 // any OpenGL stuff!
34 #include "LoadDrawObject.h"
35 #include <osg/Drawable>
36 #include <mars/interfaces/terrainStruct.h>
37 
38 namespace mars {
39  namespace graphics {
40 
41  class VertexBufferTerrain : public osg::Drawable {
42 
43  public:
46 
48  const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY) {
49  fprintf(stderr, "error: not implemented yet!!");
50  }
51 
52  virtual ~VertexBufferTerrain();
53 
54  virtual osg::Object* cloneType() const {
55  fprintf(stderr, "error: not implemented yet!!");
56  return new VertexBufferTerrain();
57  }
58 
59  virtual osg::Object* clone(const osg::CopyOp& copyop) const {
60  fprintf(stderr, "error: not implemented yet!!");
61  return new VertexBufferTerrain (*this, copyop);
62  }
63 
64  virtual void drawImplementation(osg::RenderInfo& renderInfo) const;
65  void collideSphere(double xPos, double yPos, double zPos, double radius);
66  virtual osg::BoundingBox computeBound() const;
67  void setSelected(bool val);
68 
69  private:
71  double width, height, scale;
72 
73  }; // end of class VertexBufferTerrain
74 
75  } // end of namespace graphics
76 } // end of namespace mars
77 
78 #endif /* MARS_GRAPHICS_VERTEX_BUFFER_TERRAIN_H */
virtual osg::Object * cloneType() const
terrainStruct is a struct to exchange height maps between the GUI and the simulation ...
Definition: terrainStruct.h:34
virtual void drawImplementation(osg::RenderInfo &renderInfo) const
void collideSphere(double xPos, double yPos, double zPos, double radius)
virtual osg::BoundingBox computeBound() const
VertexBufferTerrain(const VertexBufferTerrain &pg, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
Copyright 2012, DFKI GmbH Robotics Innovation Center.
MultiResHeightMapRenderer * mrhmr
virtual osg::Object * clone(const osg::CopyOp &copyop) const