ElevationMap.h
Go to the documentation of this file.
1 /*+-------------------------------------------------------------------------+
2  | MultiVehicle simulator (libmvsim) |
3  | |
4  | Copyright (C) 2014 Jose Luis Blanco Claraco (University of Almeria) |
5  | Copyright (C) 2017 Borys Tymchenko (Odessa Polytechnic University) |
6  | Distributed under GNU General Public License version 3 |
7  | See <http://www.gnu.org/licenses/> |
8  +-------------------------------------------------------------------------+ */
9 
10 #pragma once
11 
13 #include <mrpt/opengl/CMesh.h>
14 #include <mrpt/poses/CPose3D.h>
15 
16 #include <mrpt/version.h>
17 #if MRPT_VERSION>=0x199
18 #include <mrpt/tfest/TMatchingPair.h>
19 #include <mrpt/img/CImage.h>
20 using mrpt::tfest::TMatchingPairList;
21 using mrpt::tfest::TMatchingPair;
22 using mrpt::img::CImage;
23 #else
24 #include <mrpt/utils/CImage.h>
25 #include <mrpt/utils/TMatchingPair.h>
26 using mrpt::utils::TMatchingPairList;
27 using mrpt::utils::TMatchingPair;
28 using mrpt::utils::CImage;
29 #endif
30 
31 
32 namespace mvsim
33 {
35 {
37  public:
38  ElevationMap(World* parent, const rapidxml::xml_node<char>* root);
39  virtual ~ElevationMap();
40 
41  virtual void loadConfigFrom(
42  const rapidxml::xml_node<char>* root);
43  virtual void gui_update(
44  mrpt::opengl::COpenGLScene& scene);
45 
46  virtual void simul_pre_timestep(
47  const TSimulContext& context);
48  virtual void simul_post_timestep(
49  const TSimulContext& context);
50 
51  bool getElevationAt(
52  double x, double y, float& z) const;
53 
54  protected:
57  mrpt::opengl::CMesh::Ptr m_gl_mesh;
59  double m_resolution;
60  mrpt::math::CMatrixFloat m_mesh_z_cache;
61 
64  private:
65  // temp vars (declared here to avoid reallocs):
66  TMatchingPairList corrs;
67  mrpt::poses::CPose3D m_optimal_transf;
68 };
69 }
virtual void simul_pre_timestep(const TSimulContext &context)
See docs in base class.
virtual void gui_update(mrpt::opengl::COpenGLScene &scene)
See docs in base class.
TMatchingPairList corrs
Definition: ElevationMap.h:66
TFSIMD_FORCE_INLINE const tfScalar & y() const
virtual void simul_post_timestep(const TSimulContext &context)
See docs in base class.
virtual void loadConfigFrom(const rapidxml::xml_node< char > *root)
See docs in base class.
ElevationMap(World *parent, const rapidxml::xml_node< char > *root)
TFSIMD_FORCE_INLINE const tfScalar & x() const
#define DECLARES_REGISTER_WORLD_ELEMENT(CLASS_NAME)
TFSIMD_FORCE_INLINE const tfScalar & z() const
mrpt::opengl::CMesh::Ptr m_gl_mesh
Definition: ElevationMap.h:57
mrpt::math::CMatrixFloat m_mesh_z_cache
Definition: ElevationMap.h:60
bool getElevationAt(double x, double y, float &z) const
return false if out of bounds
mrpt::poses::CPose3D m_optimal_transf
Definition: ElevationMap.h:67


mvsim
Author(s):
autogenerated on Thu Jun 6 2019 19:36:40