node_stamped_base_pa.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 *                                                                             *
00003 * node_stamped_base_pa.h                                                      *
00004 * ======================                                                      *
00005 *                                                                             *
00006 * File is based on OcTreeStamped.h and OcTreeNode.h                           *
00007 *                                                                             *
00008 *******************************************************************************
00009 *                                                                             *
00010 * github repository                                                           *
00011 *   https://github.com/TUC-ProAut/ros_octomap                                 *
00012 *                                                                             *
00013 * Chair of Automation Technology, Technische Universität Chemnitz             *
00014 *   https://www.tu-chemnitz.de/etit/proaut                                    *
00015 *                                                                             *
00016 *******************************************************************************
00017 *                                                                             *
00018 * New BSD License                                                             *
00019 *                                                                             *
00020 * Copyright (c) 2015-2018, Peter Weissig, Technische Universität Chemnitz     *
00021 * All rights reserved.                                                        *
00022 *                                                                             *
00023 * Redistribution and use in source and binary forms, with or without          *
00024 * modification, are permitted provided that the following conditions are met: *
00025 *     * Redistributions of source code must retain the above copyright        *
00026 *       notice, this list of conditions and the following disclaimer.         *
00027 *     * Redistributions in binary form must reproduce the above copyright     *
00028 *       notice, this list of conditions and the following disclaimer in the   *
00029 *       documentation and/or other materials provided with the distribution.  *
00030 *     * Neither the name of the Technische Universität Chemnitz nor the       *
00031 *       names of its contributors may be used to endorse or promote products  *
00032 *       derived from this software without specific prior written permission. *
00033 *                                                                             *
00034 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" *
00035 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE   *
00036 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE  *
00037 * ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY      *
00038 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES  *
00039 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR          *
00040 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER  *
00041 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT          *
00042 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY   *
00043 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH *
00044 * DAMAGE.                                                                     *
00045 *                                                                             *
00046 ******************************************************************************/
00047 
00048 #ifndef NODE_STAMPED_BASE_PA_H
00049 #define NODE_STAMPED_BASE_PA_H
00050 
00051 // local headers
00052 #include "octomap_pa/time_pa.h"
00053 
00054 // standard headers
00055 #include <stdint.h>
00056 #include <iostream>
00057 #include <cstddef>
00058 
00059 //**************************[cNodeStampedBasePa]*******************************
00060 template <typename NODE>
00061 class cNodeStampedBasePa : public NODE {
00062 
00063   public:
00064     typedef NODE                     NodeTypeBase;
00065     typedef cNodeStampedBasePa<NODE> NodeTypeFull;
00066 
00067     cNodeStampedBasePa();
00068     cNodeStampedBasePa(const cNodeStampedBasePa<NODE>& other);
00069     cNodeStampedBasePa(const cTimePa &timestamp);
00070     virtual ~cNodeStampedBasePa();
00071 
00072     bool operator==(const cNodeStampedBasePa<NODE>& other) const;
00073 
00074     void copyData(const cNodeStampedBasePa<NODE>& from);
00075 
00076     // streaming (saving and loading)
00077     virtual std::istream& readData(std::istream &s);
00078     virtual std::ostream& writeData(std::ostream &s) const;
00079 
00080     // timestamp
00081     inline const cTimePa& getTimestamp() const;
00082     inline void setTimestamp(const cTimePa &timestamp);
00083     inline void updateTimestamp(const cTimePa &timestamp);
00084 
00085     // update occupancy and timesteps of inner nodes
00086     inline void updateTimestampChildren();
00087     inline void updateOccupancyChildren();
00088 
00089     // deprecated - this is moved to the octree itself or
00090     //              it is using virtual functions (V1.8)
00091     // but we are using an older version (ros indigo == V1.6)
00092     bool createChild(unsigned int i);
00093     virtual inline NodeTypeFull* getChild(unsigned int i);
00094     virtual inline const NodeTypeFull* getChild(unsigned int i) const;
00095     bool collapsible(void) const;
00096     bool deleteChild(unsigned int i);
00097     bool pruneNode(void);
00098     void expandNode(void);
00099 
00100     std::istream& readValue (std::istream &s);
00101     std::ostream& writeValue(std::ostream &s) const;
00102 
00103   protected:
00104     cTimePa timestamp;
00105 };
00106 
00107 #include "octomap_pa/node_stamped_base_pa.hxx"
00108 
00109 #endif //#ifndef NODE_STAMPED_BASE_PA_H


octomap_pa
Author(s):
autogenerated on Thu Jun 6 2019 17:53:30