xc
Hexahedron3d.h
1 // -*-c++-*-
2 //----------------------------------------------------------------------------
3 // xc utils library; general purpose classes and functions.
4 //
5 // Copyright (C) Luis C. Pérez Tato
6 //
7 // XC utils is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by
9 // the Free Software Foundation, either version 3 of the License, or
10 // (at your option) any later version.
11 //
12 // This software is distributed in the hope that it will be useful, but
13 // WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with this program.
19 // If not, see <http://www.gnu.org/licenses/>.
20 //----------------------------------------------------------------------------
21 //HEXAHEDRON3D.h
22 
23 #ifndef HEXAHEDRON3D_H
24 #define HEXAHEDRON3D_H
25 
26 #include <iostream>
27 #include "Polyhedron3d.h"
28 
29 class HalfSpace3d;
30 class Polyhedron3d;
31 class PointCloud3d;
32 //
33 // 4 +---------+ 7
34 // /| /|
35 // / | / |
36 // 5 +---------+6 |
37 // | | | |
38 // |3 +------|--+ 2
39 // | / | /
40 // |/ |/
41 // 0 +---------+ 1
42 //
44 //
47  {
48  public:
49  Hexahedron3d(void);
50  Hexahedron3d(const Pos3d &p0, const Pos3d &p1,const Pos3d &p2, const Pos3d &p3, const Pos3d &p4, const Pos3d &p5,const Pos3d &p6, const Pos3d &p7);
51  GeomObj *getCopy(void) const
52  { return new Hexahedron3d(*this); }
53 
54  virtual GeomObj::list_Pos3d getVertices(void) const;
55 
56  GEOM_FT getVolumeWithSign(void) const;
57  GEOM_FT getVolume(void) const;
58  };
59 
60 Hexahedron3d get_oriented_bounding_box(const PointCloud3d &, const Ref3d3d &);
61 Hexahedron3d get_oriented_bounding_box(const PointCloud3d &);
62 #endif
GeomObj * getCopy(void) const
Constructor virtual.
Definition: Hexahedron3d.h:51
Hexahedron.
Definition: Hexahedron3d.h:46
Base class for polyhedrons in a three-dimensional space.
Definition: Polyhedron3d.h:41
Hexahedron3d(void)
Default constructor.
Definition: Hexahedron3d.cc:99
GEOM_FT getVolume(void) const
Return the volume of the object.
Definition: Hexahedron3d.cc:140
GEOM_FT getVolumeWithSign(void) const
Return the volume of the body with sign.
Definition: Hexahedron3d.cc:132
Posición en tres dimensiones.
Definition: Pos3d.h:44
virtual GeomObj::list_Pos3d getVertices(void) const
Return the vertices of the hexahedron.
Definition: Hexahedron3d.cc:113
Base class for position lists.
Definition: PointCloud3d.h:36
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
Three-dimensional reference system defined in a three-dimensional space.
Definition: Ref3d3d.h:39