Class xlifepp::Cone#

class Cone : public xlifepp::Trunk#

A cone is a volume defined by a section (the basis) and a direction vector The direction vector is not necessarily orthogonal to the basis, but both bases are necessarily parallel A Cone is a Trunk with scale factor equal to 0 !!!

Cone constructors are based on a key-value system. Here are the available keys:

  • _basis: to define the geometrical basis of a Cone (a child object of Surface)

  • _apex: the apex of the Cone

  • _center1: to define the center of the basis when they are elliptical

  • _v1, _v2: to define apogees of the basis when it is elliptical

  • _nnodes: to define the number of nodes on the edges of the Cone

  • _hsteps: to define the local mesh steps on build points of the Cone

  • _domain_name: to define the domain name

  • _side_names/_face_name: to define the side names

  • _edge_name: to define the side of side names

  • _vertex_name: to define the side of side of side names

  • _varnames: to define the variable names for print purpose

Subclassed by xlifepp::Pyramid

Public Functions

Cone(bool defineBasisAndP = true)#

default constructor

Cone(const Cone &c)#

copy constructor

Cone(const Surface &basis, const Point &apex)#

default constructor with basis and apex

Cone(Parameter p1, Parameter p2)#

key-value constructor

inline Point apex() const#

accessor to apex_

virtual string_t asString() const#

format as string

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

returns list of points on boundary (const)

inline virtual Geometry *clone() const#

virtual copy constructor

inline virtual void computeMB()#

compute the minimal box for a composite/loop geometry

compute the minimal box

inline virtual Cone *cone()#

access to child Cone2d object

inline virtual const Cone *cone() const#

access to child Cone object (const)

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

returns list of curves (const)

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

apply a homothety on a Cone (1 key)

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

apply a homothety on a Cone (2 keys)

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

apply a homothety on a Cone

inline virtual Cone &homothetize(real_t factor)#

apply a homothety on a Cone

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

apply a point reflection on a Cone (1 key)

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

apply a point reflection on a Cone

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

apply a reflection2d on a Cone (1 key)

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

apply a reflection2d on a Cone (2 keys)

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

apply a reflection2d on a Cone

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

apply a reflection2d on a Cone

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

apply a reflection3d on a Cone (1 key)

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

apply a reflection3d on a Cone (2 keys)

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

apply a reflection3d on a Cone

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

apply a reflection3d on a Cone

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

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

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

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

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

apply a rotation 2D on a Cone

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

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

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

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

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

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

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

apply a rotation on a Cone

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

apply a rotation on a Cone

inline virtual Cone &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 Cone

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

apply a rotation 3D on a Cone

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

apply a rotation 3D on a Cone

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

returns list of faces (const)

virtual Cone &transform(const Transformation &t)#

apply a geometrical transformation on a Cone

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

apply a translation on a Cone (1 key)

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

apply a translation on a Cone (3 reals version)

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

apply a translation on a Cone (vector version)