estar/Region.hpp

Go to the documentation of this file.
00001 /* 
00002  * Copyright (C) 2006
00003  * Swiss Federal Institute of Technology, Zurich. All rights reserved.
00004  * 
00005  * Author: Roland Philippsen <roland dot philippsen at gmx net>
00006  *         Autonomous Systems Lab <http://www.asl.ethz.ch/>
00007  * 
00008  * This program is free software; you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation; either version 2 of the License, or
00011  * (at your option) any later version.
00012  * 
00013  * This program is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  * GNU General Public License for more details.
00017  * 
00018  * You should have received a copy of the GNU General Public License
00019  * along with this program; if not, write to the Free Software
00020  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00021  * USA
00022  */
00023 
00024 
00025 #ifndef ESTAR_REGION_HPP
00026 #define ESTAR_REGION_HPP
00027 
00028 
00029 #include <estar/Sprite.hpp>
00030 #include <boost/shared_ptr.hpp>
00031 
00032 
00033 namespace estar {
00034   
00035   
00039   class Region
00040   {
00041   public:
00042     typedef Sprite::sindex sindex;
00043     typedef Sprite::indexlist_t indexlist_t;
00044     
00045     const double x0;
00046     const double y0;
00047     
00049     Region(boost::shared_ptr<Sprite> sprite,
00051            double x0,
00053            double y0,
00054            ssize_t xbegin,
00055            ssize_t xend,
00056            ssize_t ybegin,
00057            ssize_t yend);
00058     
00060     Region(
00061            double radius,
00063            double scale,
00065            double x0,
00067            double y0,
00068            ssize_t xbegin,
00069            ssize_t xend,
00070            ssize_t ybegin,
00071            ssize_t yend);
00072     
00073     const Sprite & GetSprite() const { return * m_sprite; }
00074     const indexlist_t & GetBorder() const { return m_border; }
00075     const indexlist_t & GetArea() const { return m_area; }
00076     
00077   private:
00078     boost::shared_ptr<Sprite> m_sprite;
00079     indexlist_t m_border;
00080     indexlist_t m_area;
00081     
00082     void Init(double radius, double scale,
00083               double x0, double y0,
00084               ssize_t xbegin, ssize_t xend,
00085               ssize_t ybegin, ssize_t yend);
00086   };
00087   
00088 }
00089 
00090 #endif // ESTAR_REGION_HPP

doxygen SourceForge.net Logo
E* Interpolated Graph Replanner Wed Dec 12 18:55:40 2007