Class xlifepp::Polygon#
-
class Polygon : public xlifepp::Surface#
-
Inheritence diagram for xlifepp::Polygon:
Collaboration diagram for xlifepp::Polygon:
definition of a polygonal geometry in R^3
Polygon constructors are based on a key-value system. Here are the available keys:
_vertices: the vertices defining the polygon, oriented along the boundary (clockwise or counterclockwise)
_nnodes: to define the number of nodes on each edge of the Polygon
_hsteps: to define the local mesh steps on the vertices of the Polygon
_domain_name: to define the domain name
_side_names: to define the side names
_varnames: to define the variable names for print purpose
Subclassed by xlifepp::Quadrangle, xlifepp::Triangle
Public Functions
-
Polygon()#
-
default constructor
default polygon is triangle is (0,0) (1,0) (0,1), parametrization not allocated
-
Polygon(const std::vector<Point> &vertices, const std::vector<number_t> &n = std::vector<number_t>(4, 2), const string_t &domName = string_t())#
-
default constructor with vertices
-
Polygon(const std::vector<Point> &vertices, const std::vector<real_t> &h, const string_t &domName = string_t())#
-
default constructor with vertices
-
inline virtual ~Polygon()#
-
destructor
-
virtual string_t asString() const#
-
format as string
-
virtual Geometry &buildBoundary() const#
-
create boundary geometry
create boundary geometry of polygons
-
virtual void collect(const string_t &n, std::list<Geometry*>&) const#
-
collect in a list all canonical geometry’s with name n
collect in a list all canonical geometry’s with name n (may be the polygon itself and some polygon sides)
-
virtual void computeMB()#
-
computes the minimal box
-
virtual std::vector<std::pair<ShapeType, std::vector<const Point*>>> curves() const#
-
return list of edges (const)
-
inline virtual Polygon &homothetize(const Parameter &p1, const Parameter &p2)#
-
apply a homothety on a Polygon (2 keys)
-
inline virtual Polygon &homothetize(const Point &c = Point(0., 0., 0.), real_t factor = 1.)#
-
apply a homothety on a Polygon
-
inline virtual bool isPlane() const#
-
return true if geometry is plane
-
virtual std::vector<int_t> nnodesPerBorder()#
-
i-th value is nnodes of the Geometry’s i-th border, else -1 if defined with hsteps
-
inline virtual Polygon &pointReflect(const Parameter &p1)#
-
apply a point reflection on a Polygon (1 key)
-
inline virtual Polygon &pointReflect(const Point &c = Point(0., 0., 0.))#
-
apply a point reflection on a Polygon
-
virtual void printDetail(std::ostream &os) const#
-
print more infos
print additional information
-
inline virtual Polygon &reflect2d(const Parameter &p1, const Parameter &p2)#
-
apply a reflection2d on a Polygon (2 keys)
-
inline virtual Polygon &reflect2d(const Point &c, real_t dx, real_t dy = 0.)#
-
apply a reflection2d on a Polygon
-
inline virtual Polygon &reflect2d(const Point &c = Point(0., 0.), std::vector<real_t> d = std::vector<real_t>(2, 0.))#
-
apply a reflection2d on a Polygon
-
inline virtual Polygon &reflect3d(const Parameter &p1, const Parameter &p2)#
-
apply a reflection3d on a Polygon (2 keys)
-
inline virtual Polygon &reflect3d(const Point &c, real_t nx, real_t ny, real_t nz = 0.)#
-
apply a reflection3d on a Polygon
-
inline virtual Polygon &reflect3d(const Point &c = Point(0., 0., 0.), std::vector<real_t> n = std::vector<real_t>(3, 0.))#
-
apply a reflection3d on a Polygon
-
inline virtual Polygon &rotate2d(const Parameter &p1, const Parameter &p2)#
-
apply a rotation 2D on a Polygon (2 keys)
-
inline virtual Polygon &rotate2d(const Point &c, real_t angle = 0.)#
-
apply a rotation 2D on a Polygon
-
inline virtual Polygon &rotate3d(const Parameter &p1, const Parameter &p2)#
-
apply a rotation 3D on a Polygon (2 keys)
-
inline virtual Polygon &rotate3d(const Parameter &p1, const Parameter &p2, const Parameter &p3)#
-
apply a rotation 3D on a Polygon (3 keys)
-
inline virtual Polygon &rotate3d(const Point &c, real_t dx, real_t dy, real_t angle)#
-
apply a rotation on a Polygon
-
inline virtual Polygon &rotate3d(const Point &c, real_t dx, real_t dy, real_t dz, real_t angle)#
-
apply a rotation on a Polygon
-
inline virtual Polygon &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 Polygon
-
inline virtual Polygon &rotate3d(real_t dx, real_t dy, real_t angle)#
-
apply a rotation 3D on a Polygon
-
inline virtual Polygon &rotate3d(real_t dx, real_t dy, real_t dz, real_t angle)#
-
apply a rotation 3D on a Polygon
-
virtual std::vector<std::pair<ShapeType, std::vector<const Point*>>> surfs() const#
-
return list of surfaces (const)
-
virtual Polygon &transform(const Transformation &t)#
-
apply a geometrical transformation on a Polygon
-
inline virtual Polygon &translate(real_t ux, real_t uy = 0., real_t uz = 0.)#
-
apply a translation on a Polygon (3 reals version)