2
* Copyright Staffan Gimåker 2007-2010.
6
* This file is part of peekabot.
8
* peekabot is free software; you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License as published by
10
* the Free Software Foundation; either version 3 of the License, or
11
* (at your option) any later version.
13
* peekabot is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU General Public License for more details.
18
* You should have received a copy of the GNU General Public License
19
* along with this program. If not, see <http://www.gnu.org/licenses/>.
22
#ifndef PEEKABOT_OCCUPANCY_GRID_3D_HH_INCLUDED
23
#define PEEKABOT_OCCUPANCY_GRID_3D_HH_INCLUDED
28
#include "SceneObject.hh"
29
#include "ScalableObject.hh"
30
#include "ObjectVisitor.hh"
31
#include "HandlerInformer.hh"
38
class OccupancyGrid3D : public SceneObject,
42
OccupancyGrid3D(float cell_size) throw();
44
/** \brief Construct object from XML data.
46
OccupancyGrid3D(ScopedHandler *handler);
48
/** \brief Method for accepting \c ObjectVisitor objects.
50
* This method performs an automatic type cast by calling the \c visit()
51
* method of the visitor, allowing it to perform type-dependent task.
53
virtual void accept(ObjectVisitor *visitor) throw();
55
float get_cell_size() const throw();
57
// belief = -1 <=> clear cell
58
void set_cell(const Eigen::Vector3f &x, float belief) throw();
60
void set_cells(const std::vector<std::pair<Eigen::Vector3f, float> > &cells) throw();
65
typedef boost::signal<
66
void (OccupancyGrid3D *object,
67
const std::vector<std::pair<Eigen::Vector3f, float> > &cells)
70
OnCellsSet m_on_cells_set;
75
/// \name XML handler methods
78
/** \brief Element start handler for XML parsing.
80
static void start_handler(
81
const std::string & name,
82
XMLHandler::AttributeMap &attributes,
83
ScopedHandler *handler) throw();
88
//static HandlerInformer ms_handler_informer;
94
#endif // PEEKABOT_OCCUPANCY_GRID_3D_HH_INCLUDED