SelectionBox.h
Go to the documentation of this file.
00001 /*
00002  * This file is part of OctoMap - An Efficient Probabilistic 3D Mapping
00003  * Framework Based on Octrees
00004  * http://octomap.github.io
00005  *
00006  * Copyright (c) 2009-2014, K.M. Wurm and A. Hornung, University of Freiburg
00007  * All rights reserved. License for the viewer octovis: GNU GPL v2
00008  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
00009  *
00010  *
00011  * This program is free software; you can redistribute it and/or modify
00012  * it under the terms of the GNU General Public License as published by
00013  * the Free Software Foundation; either version 2 of the License, or
00014  * (at your option) any later version.
00015  *
00016  * This program is distributed in the hope that it will be useful, but
00017  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
00018  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
00019  * for more details.
00020  *
00021  * You should have received a copy of the GNU General Public License
00022  * along with this program. If not, see http://www.gnu.org/licenses/.
00023  */
00024 
00025 #ifndef SELECTIONBOX_H_
00026 #define SELECTIONBOX_H_
00027 
00028 #include <qglviewer.h>
00029 
00030 namespace octomap {
00031   class SelectionBox{
00032 
00033   public:
00034     SelectionBox();
00035     virtual ~SelectionBox();
00036     void draw(bool withNames = false);
00037     const qglviewer::ManipulatedFrame* frame (unsigned short i) const { return m_frames.at(i); }
00038     qglviewer::ManipulatedFrame* frame (unsigned short i) { return m_frames.at(i); }
00039     void getBBXMin(float& x, float& y, float& z) const;
00040     void getBBXMax(float& x, float& y, float& z) const;
00041     int getGrabbedFrame() const;
00042 
00043   protected:
00044     void drawAxis(float length = 0.2f) const;
00045 
00046     bool m_visible;
00047     std::vector<qglviewer::ManipulatedFrame*> m_frames;
00048     unsigned short m_selectedFrame;
00049     qglviewer::Vec m_minPt;
00050     qglviewer::Vec m_maxPt;
00051     float m_arrowLength;
00052 
00053   };
00054 
00055 
00056 
00057 }
00058 
00059 
00060 
00061 
00062 #endif


octovis
Author(s): Kai M. Wurm , Armin Hornung
autogenerated on Thu Feb 11 2016 23:51:20