Class xlifepp::Curve#

class Curve : public xlifepp::Geometry#

base class for 1D geometries

Subclassed by xlifepp::CircArc, xlifepp::EllArc, xlifepp::ParametrizedArc, xlifepp::Segment, xlifepp::SplineArc

Public Functions

Curve()#

default constructor

default curve is inside the bounding box [0,1]

inline Curve(const Curve &c)#

copy constructor

inline virtual ~Curve()#

virtual destructor

inline virtual string_t asString() const#

format as string

virtual std::vector<const Point*> boundNodes() const#

returns list of points on boundary (const)

return the list of vertices

inline virtual Geometry *clone() const#

virtual copy constructor for Geometry

virtual void computeBB()#

compute approximated boundingBox by sampling n values, requires parametrization

inline virtual void computeMB()#

computes the minimal box

inline virtual Curve *curve()#

access to Curve object (non const), virtual in Geometry

inline virtual const Curve *curve() const#

access to Curve object (const), virtual in Geometry

virtual std::vector<std::pair<ShapeType, std::vector<const Point*>>> curves() const#

return the list of curves

inline virtual std::vector<real_t> &h()#

return the local steps on the curve

inline virtual const std::vector<real_t> &h() const#

return the local steps on the curve

inline real_t h1() const#

return the local step on the first vertex

inline real_t h2() const#

return the local step on the second vertex

inline virtual Curve &homothetize(const Parameter &p1)#

apply a homothety on a Curve (1 key)

inline virtual Curve &homothetize(const Parameter &p1, const Parameter &p2)#

apply a homothety on a Curve (2 keys)

inline virtual Curve &homothetize(const Point &c = Point(0., 0., 0.), real_t factor = 1.)#

apply a homothety on a Curve

inline virtual Curve &homothetize(real_t factor)#

apply a homothety on a Curve

inline virtual bool isClosed() const#

accessor to know if the curve is closed or not

inline virtual std::vector<number_t> &n()#

accessor to number of nodes on curve (read/write)

inline virtual const std::vector<number_t> &n() const#

default minimal box = bounding box

accessor to number of nodes on curve (read only)

inline number_t &n(number_t i)#

accessor to number of nodes on curve (read/write)

inline virtual number_t n(number_t i) const#

accessor to number of nodes on curve (read only)

inline const Point &p1() const#

accessor to point

inline virtual Curve &pointReflect(const Parameter &p1)#

apply a point reflection on a Curve (1 key)

inline virtual Curve &pointReflect(const Point &c = Point(0., 0., 0.))#

apply a point reflection on a Curve

inline virtual Curve &reflect2d(const Parameter &p1)#

apply a reflection2d on a Curve (1 key)

inline virtual Curve &reflect2d(const Parameter &p1, const Parameter &p2)#

apply a reflection2d on a Curve (2 keys)

inline virtual Curve &reflect2d(const Point &c, real_t dx, real_t dy = 0.)#

apply a reflection2d on a Curve

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

apply a reflection2d on a Curve

inline virtual Curve &reflect3d(const Parameter &p1)#

apply a reflection3d on a Curve (1 key)

inline virtual Curve &reflect3d(const Parameter &p1, const Parameter &p2)#

apply a reflection3d on a Curve (2 keys)

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

apply a reflection3d on a Curve

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

apply a reflection3d on a Curve

inline Curve reverse() const#

reverse orientation of curve

inline virtual Curve &rotate2d(const Parameter &p1)#

apply a rotation 2D on a Curve (1 key)

inline virtual Curve &rotate2d(const Parameter &p1, const Parameter &p2)#

apply a rotation 2D on a Curve (2 keys)

inline virtual Curve &rotate2d(const Point &c, real_t angle = 0.)#

apply a rotation 2D on a Curve

inline virtual Curve &rotate3d(const Parameter &p1)#

apply a rotation 3D on a Curve (1 key)

inline virtual Curve &rotate3d(const Parameter &p1, const Parameter &p2)#

apply a rotation 3D on a Curve (2 keys)

inline virtual Curve &rotate3d(const Parameter &p1, const Parameter &p2, const Parameter &p3)#

apply a rotation 3D on a Curve (3 keys)

inline virtual Curve &rotate3d(const Point &c, real_t dx, real_t dy, real_t angle)#

apply a rotation on a Curve

inline virtual Curve &rotate3d(const Point &c, real_t dx, real_t dy, real_t dz, real_t angle)#

apply a rotation on a Curve

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

apply a rotation 3D on a Curve

inline virtual Curve &rotate3d(real_t dx, real_t dy, real_t angle)#

apply a rotation 3D on a Curve

inline virtual Curve &rotate3d(real_t dx, real_t dy, real_t dz, real_t angle)#

apply a rotation 3D on a Curve

inline virtual void setHstep(real_t h)#

set hsteps vector from scalar h

inline virtual void setNnodes(number_t i)#

set the main nnodes, if not overriden do nothing

inline virtual std::vector<std::pair<ShapeType, std::vector<const Point*>>> surfs() const#

return the list of surfaces

virtual Curve &transform(const Transformation &t)#

apply a geometrical transformation on a Curve

inline virtual Curve &translate(const Parameter &p1)#

apply a translation on a Curve (1 key)

inline virtual Curve &translate(real_t ux, real_t uy = 0., real_t uz = 0.)#

apply a translation on a Curve (3 reals version)

inline virtual Curve &translate(std::vector<real_t> u)#

apply a translation on a Curve (vector version)

inline virtual bool withNnodes() const#

check if Segment is defined only with _nnodes or with _hsteps option