23 #ifndef POLYHEDRON3D_H 24 #define POLYHEDRON3D_H 27 #include "PolyhedronBase.h" 28 #include "../../cgal_types.h" 29 #include "PolygonMap.h" 30 #include "enriched_polyhedron.h" 44 CGPolyhedron_3 cgpolyhedron;
50 void make_polyhedron(
const std::deque<HalfSpace3d> &);
54 typedef CGPolyhedron_3::Vertex Vertex;
55 typedef CGPolyhedron_3::Facet Facet;
57 typedef CGPolyhedron_3::Point_iterator Point_iterator;
58 typedef CGPolyhedron_3::Point_const_iterator Point_const_iterator;
59 typedef CGPolyhedron_3::Vertex_iterator Vertex_iterator;
60 typedef CGPolyhedron_3::Vertex_const_iterator Vertex_const_iterator;
61 typedef CGPolyhedron_3::Facet_iterator Facet_iterator;
62 typedef CGPolyhedron_3::Facet_const_iterator Facet_const_iterator;
63 typedef CGPolyhedron_3::Edge_iterator Edge_iterator;
64 typedef CGPolyhedron_3::Halfedge_iterator Halfedge_iterator;
65 typedef CGPolyhedron_3::Halfedge_around_facet_circulator Halfedge_around_facet_circulator;
66 typedef CGPolyhedron_3::Halfedge_around_vertex_circulator Halfedge_around_vertex_circulator;
67 typedef CGPolyhedron_3::Vertex_handle Vertex_handle;
68 typedef CGPolyhedron_3::Facet_handle Facet_handle;
69 typedef CGPolyhedron_3::Halfedge_handle Halfedge_handle;
70 typedef CGPolyhedron_3::HalfedgeDS HalfedgeDS;
81 Point_iterator points_begin(
void)
82 {
return cgpolyhedron.points_begin(); }
83 Point_iterator points_end(
void)
84 {
return cgpolyhedron.points_end(); }
85 Vertex_iterator vertices_begin(
void)
86 {
return cgpolyhedron.vertices_begin(); }
87 Vertex_iterator vertices_end(
void)
88 {
return cgpolyhedron.vertices_end(); }
89 Facet_iterator facets_begin(
void)
90 {
return cgpolyhedron.facets_begin(); }
91 Facet_iterator facets_end(
void)
92 {
return cgpolyhedron.facets_end(); }
93 Point_const_iterator points_begin(
void)
const 94 {
return cgpolyhedron.points_begin(); }
95 Point_const_iterator points_end(
void)
const 96 {
return cgpolyhedron.points_end(); }
97 Vertex_const_iterator vertices_begin(
void)
const 98 {
return cgpolyhedron.vertices_begin(); }
99 Vertex_const_iterator vertices_end(
void)
const 100 {
return cgpolyhedron.vertices_end(); }
101 Facet_const_iterator facets_begin(
void)
const 102 {
return cgpolyhedron.facets_begin(); }
103 Facet_const_iterator facets_end(
void)
const 104 {
return cgpolyhedron.facets_end(); }
106 GEOM_FT
GetMax(
unsigned short int i)
const;
107 GEOM_FT
GetMin(
unsigned short int i)
const;
108 size_t getNumVertices(
void)
const 109 {
return cgpolyhedron.size_of_vertices(); }
110 size_t getNumEdges(
void)
const 111 {
return cgpolyhedron.size_of_halfedges(); }
112 size_t GetNumCaras(
void)
const 113 {
return cgpolyhedron.size_of_facets(); }
116 { cgpolyhedron.clear(); }
119 Plane getPlaneFromFace(
const Facet_const_iterator &fi)
const;
121 std::deque<Polygon3d>
GetCaras(
void)
const;
125 virtual GEOM_FT
getArea(
void)
const;
130 {
return getPolygonMap(cgpolyhedron); }
144 template <
class InputIterator>
145 friend Polyhedron3d get_convex_hull(InputIterator first,InputIterator last);
147 void Print(std::ostream &os)
const;
148 void ReadOFF(std::istream &is);
152 {
return p.GetPolygonMap(); }
154 {
return p.GetEnriquecido(); }
bool TocaCuadrante(const int &) const
Return verdadero si alguno de los vertices toca el cuadrante que se pasa como parámetro.
Definition: Polyhedron3d.cc:268
Definition: enriched_polyhedron.h:174
Plane polygon in a 3D space.
Definition: Polygon3d.h:35
std::deque< Polygon3d > GetCaras(void) const
Return the faces of the polyhedron.
Definition: Polyhedron3d.cc:175
virtual GEOM_FT dist(const Pos3d &p) const
Return the distance to the point (negative if the point is inside the solid).
Definition: Polyhedron3d.h:137
Base class for position lists.
Definition: PolyPos.h:35
Definition: PolygonMap.h:115
friend Polyhedron3d intersection(const Polyhedron3d &a, const Polyhedron3d &b)
Intersection of the polyhedrons.
Definition: polyhedron3d_bool_op.cc:117
Base class for polyhedrons in a three-dimensional space.
Definition: Polyhedron3d.h:41
virtual GeomObj * getCopy(void) const
Constructor virtual.
Definition: Polyhedron3d.cc:74
void Print(std::ostream &os) const
Print stuff.
Definition: Polyhedron3d.cc:184
Plane in a three-dimensional space.
Definition: Plane.h:49
virtual GEOM_FT getArea(void) const
Return the sum of the areas of the faces.
Definition: Polyhedron3d.cc:116
Polyhedron3d & operator=(const Polyhedron3d &)
Assignment operator.
Definition: Polyhedron3d.cc:66
void ReadOFF(std::istream &is)
Read the polyhedrom from an Object File Format file.
Definition: Polyhedron3d.cc:194
GEOM_FT GetMin(unsigned short int i) const
Return the minimum value of the i-th coordinate.
Definition: Polyhedron3d.cc:132
Base class for the polyhedrons.
Definition: PolyhedronBase.h:35
friend Polyhedron3d Union(const Polyhedron3d &a, const Polyhedron3d &b)
Union of the polyhedron arguments.
Definition: polyhedron3d_bool_op.cc:110
Polygon3d GetCara(const Facet_const_iterator &f) const
Return la cara correspondiente al iterador.
Definition: Polyhedron3d.cc:167
friend Polyhedron3d Diferencia(const Polyhedron3d &a, const Polyhedron3d &b)
Difference of the polyhedrons.
Definition: polyhedron3d_bool_op.cc:124
GEOM_FT GetMax(unsigned short int i) const
Return the maximum value of the i-th coordinate.
Definition: Polyhedron3d.cc:124
Posición en tres dimensiones.
Definition: Pos3d.h:44
3D Triange mesh.
Definition: Triang3dMesh.h:37
Polyhedron3d(void)
Default constructor.
Definition: Polyhedron3d.cc:40
The points of the half space are those that line at the back of the plane, this being understood as t...
Definition: HalfSpace3d.h:42
Clase base para las entidades geométricas.
Definition: GeomObj.h:40
GEOM_FT PseudoDist(const Pos3d &p) const
Return the SIGNED distance from the point to the tetrahedron.
Definition: Polyhedron3d.cc:246