Class xlifepp::MinimalBox#

class MinimalBox#

utility class to describe a minimal box This is like the bounding box, but independant from the orientation.

Public Functions

inline MinimalBox()#

void constructor

MinimalBox(const Point &p0, const Point &p1)#

general constructor 1D box

MinimalBox(const Point &p0, const Point &p1, const Point &p2)#

general constructor 2D box

MinimalBox(const Point &p0, const Point &p1, const Point &p2, const Point &p3)#

general constructor 3D box

inline MinimalBox(const std::vector<Point> &bds)#

basic constructor

MinimalBox(const std::vector<RealPair>&)#

basic constructor

MinimalBox(real_t xmin, real_t xmax)#

basic constructor 1D box

MinimalBox(real_t xmin, real_t xmax, real_t ymin, real_t ymax)#

basic constructor 2D box

MinimalBox(real_t xmin, real_t xmax, real_t ymin, real_t ymax, real_t zmin, real_t zmax)#

basic constructor 3D box

string_t asString() const#

format as string: [a,b]x[c,d]x[e,f]

Point boundPt(dimen_t i) const#

return box bounds in direction i (from 1 to dim)

inline std::vector<Point> bounds() const#

return bounds_

dimen_t dim() const#

dimension of the bounding box

MinimalBox &homothetize(const Parameter &p1)#

apply a homothety on a MinimalBox (1 key)

MinimalBox &homothetize(const Parameter &p1, const Parameter &p2)#

apply a homothety on a MinimalBox (2 keys)

MinimalBox &homothetize(const Point &c, real_t factor = 1.)#

apply a homothety on a MinimalBox

MinimalBox &homothetize(real_t factor)#

apply a homothety on a MinimalBox

Point maxPoint() const#

return the max point (right,top,back)

inline Point minPoint() const#

return the min point (left,bottom,front)

MinimalBox &pointReflect(const Parameter &p1)#

apply a point reflection on a MinimalBox (1 key)

MinimalBox &pointReflect(const Point &c)#

apply a point reflection on a MinimalBox

void print(std::ostream &os) const#

print MinimalBox

MinimalBox &reflect2d(const Parameter &p1)#

apply a reflection 2D on a MinimalBox (1 key)

MinimalBox &reflect2d(const Parameter &p1, const Parameter &p2)#

apply a reflection 2D on a MinimalBox (2 keys)

MinimalBox &reflect2d(const Point &c, real_t dx, real_t dy = 0.)#

apply a reflection 2D on a MinimalBox

MinimalBox &reflect2d(const Point &c, std::vector<real_t> d = std::vector<real_t>(2, 0.))#

apply a reflection 2D on a MinimalBox

MinimalBox &reflect3d(const Parameter &p1)#

apply a reflection 3D on a MinimalBox (1 key)

MinimalBox &reflect3d(const Parameter &p1, const Parameter &p2)#

apply a reflection 3D on a MinimalBox (2 keys)

MinimalBox &reflect3d(const Point &c, real_t nx, real_t ny, real_t nz = 0.)#

apply a reflection 3D on a MinimalBox

MinimalBox &reflect3d(const Point &c, std::vector<real_t> n = std::vector<real_t>(3, 0.))#

apply a reflection 3D on a MinimalBox

MinimalBox &rotate2d(const Parameter &p1)#

apply a rotation on a MinimalBox (1 key)

MinimalBox &rotate2d(const Parameter &p1, const Parameter &p2)#

apply a rotation on a MinimalBox (2 keys)

MinimalBox &rotate2d(const Point &c, real_t angle = 0.)#

apply a rotation on a MinimalBox

MinimalBox &rotate3d(const Parameter &p1)#

apply a rotation on a MinimalBox (1 key)

MinimalBox &rotate3d(const Parameter &p1, const Parameter &p2)#

apply a rotation on a MinimalBox (2 keys)

MinimalBox &rotate3d(const Parameter &p1, const Parameter &p2, const Parameter &p3)#

apply a rotation on a MinimalBox (3 keys)

MinimalBox &rotate3d(const Point &c, real_t dx, real_t dy, real_t angle)#

apply a rotation on a MinimalBox

MinimalBox &rotate3d(const Point &c, real_t dx, real_t dy, real_t dz, real_t angle)#

apply a rotation on a MinimalBox

MinimalBox &rotate3d(const Point &c, std::vector<real_t> d = std::vector<real_t>(3, 0.), real_t angle = 0.)#

apply a rotation on a MinimalBox

MinimalBox &rotate3d(real_t dx, real_t dy, real_t angle)#

apply a rotation on a MinimalBox

MinimalBox &rotate3d(real_t dx, real_t dy, real_t dz, real_t angle)#

apply a rotation on a MinimalBox

MinimalBox &transform(const Transformation &t)#

apply a geometrical transformation on a MinimalBox

MinimalBox &translate(const Parameter &p1)#

apply a translation on a MinimalBox (1 key)

MinimalBox &translate(real_t ux, real_t uy = 0., real_t uz = 0.)#

apply a translation on a MinimalBox (3 reals version)

MinimalBox &translate(std::vector<real_t> u)#

apply a translation on a MinimalBox (vector version)

std::vector<Point> vertices() const#

returns vertices