Main MRPT website > C++ reference for MRPT 1.4.0
OcTreeBaseSE.h
Go to the documentation of this file.
1 /* +---------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2016, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +---------------------------------------------------------------------------+ */
9 #ifndef OCTOMAP_OCTREE_BASE_SE_H
10 #define OCTOMAP_OCTREE_BASE_SE_H
11 
12 // $Id: OcTreeBaseSE.h 171 2011-01-20 13:56:28Z kai_wurm $
13 
14 /**
15 * OctoMap:
16 * A probabilistic, flexible, and compact 3D mapping library for robotic systems.
17 * @author K. M. Wurm, A. Hornung, University of Freiburg, Copyright (C) 2010.
18 * @see http://octomap.sourceforge.net/
19 * License: New BSD License
20 */
21 
22 /*
23  * Copyright (c) 2010, K. M. Wurm, A. Hornung, University of Freiburg
24  * All rights reserved.
25  *
26  * Redistribution and use in source and binary forms, with or without
27  * modification, are permitted provided that the following conditions are met:
28  *
29  * * Redistributions of source code must retain the above copyright
30  * notice, this list of conditions and the following disclaimer.
31  * * Redistributions in binary form must reproduce the above copyright
32  * notice, this list of conditions and the following disclaimer in the
33  * documentation and/or other materials provided with the distribution.
34  * * Neither the name of the University of Freiburg nor the names of its
35  * contributors may be used to endorse or promote products derived from
36  * this software without specific prior written permission.
37  *
38  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
39  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
40  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
41  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
42  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
43  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
44  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
45  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
46  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
47  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
48  * POSSIBILITY OF SUCH DAMAGE.
49  */
50 
51 #include "OcTreeBase.h"
52 #include "OcTreeLUT.h"
53 
54 
55 namespace octomap {
56 
57 
58  template <class NODE>
59  class OcTreeBaseSE: public OcTreeBase<NODE> {
60 
61  public:
62 
63  OcTreeBaseSE(double _resolution);
64  virtual ~OcTreeBaseSE();
65 
66  /**
67  * Traces a ray from origin to end (excluding), returning the
68  * coordinates of all nodes traversed by the beam.
69  * (Essentially using the DDA algorithm in 3D).
70  *
71  * @param origin start coordinate of ray
72  * @param end end coordinate of ray
73  * @param ray KeyRay structure that holds the keys of all nodes traversed by the ray, excluding "end"
74  * @return Success of operation. Returning false usually means that one of the coordinates is out of the OcTree's range
75  */
76  bool computeRayKeys(const point3d& origin, const point3d& end, KeyRay& ray) const;
77 
78  NODE* getLUTNeighbor(const point3d& value, OcTreeLUT::NeighborDirection dir) const;
79 
80 
81  protected:
82 
85 
86  };
87 
88 
89 }
90 
91 #include "OcTreeBaseSE.hxx"
92 
93 #endif
OctoMap: A probabilistic, flexible, and compact 3D mapping library for robotic systems.
NODE * getLUTNeighbor(const point3d &value, OcTreeLUT::NeighborDirection dir) const
NeighborDirection
(N)orth: positive X (S)outh: negative X (W)est : positive Y (E)ast: negative Y (T)op : positive Z (B)...
Definition: OcTreeLUT.h:88
OcTreeBaseSE(double _resolution)
bool computeRayKeys(const point3d &origin, const point3d &end, KeyRay &ray) const
Traces a ray from origin to end (excluding), returning the coordinates of all nodes traversed by the ...
Implements a lookup table that allows to computer keys of neighbor cells directly, see: Samet 1989, "Implementing ray tracing with octrees and neighbor finding".
Definition: OcTreeLUT.h:78
This class represents a three-dimensional vector.
Definition: Vector3.h:65



Page generated by Doxygen 1.8.11 for MRPT 1.4.0 SVN:Unversioned directory at Tue Jun 28 11:46:25 UTC 2016