Android-cuttlefish cvd tool
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
teeui::Box< Coord > Class Template Reference

#include <utils.h>

Public Member Functions

 Box ()
 
template<typename N >
 Box (const Box< Coordinate< typename Coord::unit_t, N > > &other)
 
 Box (const Coord &x, const Coord &y, const Coord &w, const Coord &h)
 
 Box (const Point< Coord > &topLeft, const Vec2d< Coord > &extend)
 
bool contains (Point< Coord > p) const
 
bool contains (const Box &other) const
 
bool overlaps (const Box &other) const
 
bool fitsInside (const Box &other) const
 
Point< Coord > bottomRight () const
 
Point< Coord > topLeft () const
 
Vec2d< Coord > extend () const
 
Coord x () const
 
Coord y () const
 
Coord w () const
 
Coord h () const
 
Box merge (const Box &other) const
 
Box merge (const Point< Coord > &p) const
 
Box merge (const Point< Coord > *begin, const Point< Coord > *end) const
 
BoxtranslateSelf (const Point< Coord > &offset)
 
Box translate (const Point< Coord > &offset) const &
 
Box translate (const Point< Coord > &offset) &&
 

Static Public Member Functions

static Box boundingBox (const Point< Coord > *begin, const Point< Coord > *end)
 

Private Attributes

Point< Coord > topLeft_
 
Vec2d< Coord > extend_
 

Constructor & Destructor Documentation

◆ Box() [1/4]

template<typename Coord >
teeui::Box< Coord >::Box ( )
inline

◆ Box() [2/4]

template<typename Coord >
template<typename N >
teeui::Box< Coord >::Box ( const Box< Coordinate< typename Coord::unit_t, N > > &  other)
inline

◆ Box() [3/4]

template<typename Coord >
teeui::Box< Coord >::Box ( const Coord &  x,
const Coord &  y,
const Coord &  w,
const Coord &  h 
)
inline

◆ Box() [4/4]

template<typename Coord >
teeui::Box< Coord >::Box ( const Point< Coord > &  topLeft,
const Vec2d< Coord > &  extend 
)
inline

Member Function Documentation

◆ bottomRight()

template<typename Coord >
Point< Coord > teeui::Box< Coord >::bottomRight ( ) const
inline

◆ boundingBox()

template<typename Coord >
static Box teeui::Box< Coord >::boundingBox ( const Point< Coord > *  begin,
const Point< Coord > *  end 
)
inlinestatic

Creates a box that contains all of the given points.

◆ contains() [1/2]

template<typename Coord >
bool teeui::Box< Coord >::contains ( const Box< Coord > &  other) const
inline

◆ contains() [2/2]

template<typename Coord >
bool teeui::Box< Coord >::contains ( Point< Coord >  p) const
inline

◆ extend()

template<typename Coord >
Vec2d< Coord > teeui::Box< Coord >::extend ( ) const
inline

◆ fitsInside()

template<typename Coord >
bool teeui::Box< Coord >::fitsInside ( const Box< Coord > &  other) const
inline

fitsInside only compares the extend of the boxes. It returns true if this box would fit inside the other box regardless of their absolute positions.

◆ h()

template<typename Coord >
Coord teeui::Box< Coord >::h ( ) const
inline

◆ merge() [1/3]

template<typename Coord >
Box teeui::Box< Coord >::merge ( const Box< Coord > &  other) const
inline

◆ merge() [2/3]

template<typename Coord >
Box teeui::Box< Coord >::merge ( const Point< Coord > &  p) const
inline

Returns a box that contains the this box and the given point.

◆ merge() [3/3]

template<typename Coord >
Box teeui::Box< Coord >::merge ( const Point< Coord > *  begin,
const Point< Coord > *  end 
) const
inline

Returns a box that contains this box and all of the given points.

◆ overlaps()

template<typename Coord >
bool teeui::Box< Coord >::overlaps ( const Box< Coord > &  other) const
inline

◆ topLeft()

template<typename Coord >
Point< Coord > teeui::Box< Coord >::topLeft ( ) const
inline

◆ translate() [1/2]

template<typename Coord >
Box teeui::Box< Coord >::translate ( const Point< Coord > &  offset) &&
inline

◆ translate() [2/2]

template<typename Coord >
Box teeui::Box< Coord >::translate ( const Point< Coord > &  offset) const &
inline

◆ translateSelf()

template<typename Coord >
Box & teeui::Box< Coord >::translateSelf ( const Point< Coord > &  offset)
inline

◆ w()

template<typename Coord >
Coord teeui::Box< Coord >::w ( ) const
inline

◆ x()

template<typename Coord >
Coord teeui::Box< Coord >::x ( ) const
inline

◆ y()

template<typename Coord >
Coord teeui::Box< Coord >::y ( ) const
inline

Member Data Documentation

◆ extend_

template<typename Coord >
Vec2d<Coord> teeui::Box< Coord >::extend_
private

◆ topLeft_

template<typename Coord >
Point<Coord> teeui::Box< Coord >::topLeft_
private

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