BlinkenArea - GitList
Repositories
Blog
Wiki
libetherpix
Code
Commits
Branches
Tags
Search
Tree:
5bca604
Branches
Tags
master
libetherpix
simulator
bbox.h
implement drawing pixels
Stefan Schuermans
commited
5bca604
at 2017-06-10 23:09:20
bbox.h
Blame
History
Raw
/* * EtherPix simulator * * Copyright 2017 Stefan Schuermans <stefan schuermans info> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, version 3 of the License. * * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef BBOX_H #define BBOX_H /// bounding box class BBox { public: /// constructor BBox(); /// reset bounding box (de-initialize) void reset(); /// add a point to the bounding box void add(double x, double y); /** * @brief get coordinates * @return whether coordinates were there */ bool get(double &x_min, double &x_max, double &y_min, double &y_max) const; protected: bool m_init; ///< initialization flag, false means no coordinates yet double m_x_min; ///< minimum x coordinate double m_x_max; ///< maximum y coordinate double m_y_min; ///< minimum x coordinate double m_y_max; ///< maximum y coordinate }; #endif // #ifndef BBOX_H