pixled-lib
1.0
|
#include <geometry.h>
Public Member Functions | |
bounding_box () | |
bounding_box (std::vector< point > points) | |
void | stretchTo (point p) |
Public Member Functions inherited from pixled::box | |
box (point position, coordinate width, coordinate height) | |
point | position () const |
coordinate | width () const |
coordinate | height () const |
Additional Inherited Members | |
Protected Member Functions inherited from pixled::box | |
box () | |
Protected Attributes inherited from pixled::box | |
point | _position |
coordinate | _width |
coordinate | _height |
Class used to represent the bounding box of a set of point, i.e. the smallest box that contains all the points.
pixled::bounding_box::bounding_box | ( | ) |
Initializes a box that only contains (0, 0).
pixled::bounding_box::bounding_box | ( | std::vector< point > | points | ) |
Builds a bounding_box that wraps all the specified points.
stretchTo() can be used to extend the bounding box afterwards.
void pixled::bounding_box::stretchTo | ( | point | p | ) |
Stretch the bounding box so that it contains the specified point.
p | point that must be contained in the box. |