pixled-lib  1.0
Public Member Functions | List of all members
pixled::bounding_box Class Reference

#include <geometry.h>

Inheritance diagram for pixled::bounding_box:
Inheritance graph
[legend]
Collaboration diagram for pixled::bounding_box:
Collaboration graph
[legend]

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
 

Detailed Description

Class used to represent the bounding box of a set of point, i.e. the smallest box that contains all the points.

Constructor & Destructor Documentation

◆ bounding_box() [1/2]

pixled::bounding_box::bounding_box ( )

Initializes a box that only contains (0, 0).

◆ bounding_box() [2/2]

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.

Member Function Documentation

◆ stretchTo()

void pixled::bounding_box::stretchTo ( point  p)

Stretch the bounding box so that it contains the specified point.

Parameters
ppoint that must be contained in the box.

The documentation for this class was generated from the following files: