xc
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
Polyhedron3d Class Reference

Base class for polyhedrons in a three-dimensional space. More...

#include <Polyhedron3d.h>

Inheritance diagram for Polyhedron3d:
Inheritance graph
[legend]
Collaboration diagram for Polyhedron3d:
Collaboration graph
[legend]

Public Types

typedef CGPolyhedron_3::Vertex Vertex
 
typedef CGPolyhedron_3::Facet Facet
 
typedef CGPolyhedron_3::Point_iterator Point_iterator
 
typedef CGPolyhedron_3::Point_const_iterator Point_const_iterator
 
typedef CGPolyhedron_3::Vertex_iterator Vertex_iterator
 
typedef CGPolyhedron_3::Vertex_const_iterator Vertex_const_iterator
 
typedef CGPolyhedron_3::Facet_iterator Facet_iterator
 
typedef CGPolyhedron_3::Facet_const_iterator Facet_const_iterator
 
typedef CGPolyhedron_3::Edge_iterator Edge_iterator
 
typedef CGPolyhedron_3::Halfedge_iterator Halfedge_iterator
 
typedef CGPolyhedron_3::Halfedge_around_facet_circulator Halfedge_around_facet_circulator
 
typedef CGPolyhedron_3::Halfedge_around_vertex_circulator Halfedge_around_vertex_circulator
 
typedef CGPolyhedron_3::Vertex_handle Vertex_handle
 
typedef CGPolyhedron_3::Facet_handle Facet_handle
 
typedef CGPolyhedron_3::Halfedge_handle Halfedge_handle
 
typedef CGPolyhedron_3::HalfedgeDS HalfedgeDS
 
- Public Types inherited from GeomObj3d
typedef PolyPos< Pos3dlist_Pos3d
 
- Public Types inherited from GeomObj
typedef PolyPos< Pos3dlist_Pos3d
 
typedef PolyPos< Pos2dlist_Pos2d
 
- Public Types inherited from EntityWithProperties
typedef std::map< std::string, boost::python::object > PythonDict
 

Public Member Functions

 Polyhedron3d (void)
 Default constructor.
 
 Polyhedron3d (const Pos3d &, const Pos3d &, const Pos3d &, const Pos3d &)
 Constructor.
 
 Polyhedron3d (const HalfSpace3d &, const HalfSpace3d &, const HalfSpace3d &, const HalfSpace3d &)
 Constructor.
 
 Polyhedron3d (const std::deque< HalfSpace3d > &)
 Constructor.
 
 Polyhedron3d (const Polyhedron3d &)
 Copy constructor.
 
 Polyhedron3d (const EPolyhedron &e)
 Constructor.
 
Polyhedron3doperator= (const Polyhedron3d &)
 Assignment operator.
 
virtual GeomObjgetCopy (void) const
 Constructor virtual.
 
Point_iterator points_begin (void)
 
Point_iterator points_end (void)
 
Vertex_iterator vertices_begin (void)
 
Vertex_iterator vertices_end (void)
 
Facet_iterator facets_begin (void)
 
Facet_iterator facets_end (void)
 
Point_const_iterator points_begin (void) const
 
Point_const_iterator points_end (void) const
 
Vertex_const_iterator vertices_begin (void) const
 
Vertex_const_iterator vertices_end (void) const
 
Facet_const_iterator facets_begin (void) const
 
Facet_const_iterator facets_end (void) const
 
GEOM_FT GetMax (unsigned short int i) const
 Return the maximum value of the i-th coordinate.
 
GEOM_FT GetMin (unsigned short int i) const
 Return the minimum value of the i-th coordinate.
 
size_t getNumVertices (void) const
 
size_t getNumEdges (void) const
 
size_t GetNumCaras (void) const
 
void clear (void)
 
GeomObj::list_Pos3d GetVerticesCara (const Facet_const_iterator &f) const
 
Plane getPlaneFromFace (const Facet_const_iterator &fi) const
 
Polygon3d GetCara (const Facet_const_iterator &f) const
 Return la cara correspondiente al iterador.
 
std::deque< Polygon3dGetCaras (void) const
 Return the faces of the polyhedron.
 
GeomObj::list_Pos3d getVertices (void) const
 
virtual GEOM_FT getArea (void) const
 Return the sum of the areas of the faces.
 
bool TocaCuadrante (const int &) const
 Return verdadero si alguno de los vertices toca el cuadrante que se pasa como parĂ¡metro. More...
 
PolygonMap< CGPolyhedron_3 > GetPolygonMap (void) const
 
EPolyhedron GetEnriquecido (void) const
 
Triang3dMesh Triangula (void) const
 
GEOM_FT PseudoDist (const Pos3d &p) const
 Return the SIGNED distance from the point to the tetrahedron. More...
 
virtual GEOM_FT dist (const Pos3d &p) const
 Return the distance to the point (negative if the point is inside the solid). More...
 
void Print (std::ostream &os) const
 Print stuff.
 
void ReadOFF (std::istream &is)
 Read the polyhedrom from an Object File Format file.
 
- Public Member Functions inherited from PolyhedronBase
virtual unsigned short int Dimension (void) const
 Return the dimension of the object 0, 1, 2 or 3.
 
virtual GEOM_FT getLength (void) const
 Return the object length.
 
virtual GEOM_FT getVolume (void) const
 Return the object volume.
 
virtual GEOM_FT Ix (void) const
 
virtual GEOM_FT Iy (void) const
 
virtual GEOM_FT Iz (void) const
 
virtual Pos3d getCenterOfMass (void) const
 
- Public Member Functions inherited from GeomObj3d
GEOM_FT GetXMax (void) const
 
GEOM_FT GetYMax (void) const
 
GEOM_FT GetZMax (void) const
 
GEOM_FT GetXMin (void) const
 
GEOM_FT GetYMin (void) const
 
GEOM_FT GetZMin (void) const
 
virtual void XProjection (void)
 
virtual void YProjection (void)
 
virtual void ZProjection (void)
 
virtual Pos3d Projection (const Pos3d &) const
 Return the orthogonal projection onto the line. More...
 
virtual Vector3d Projection (const Vector3d &) const
 Return the projection onto the line. More...
 
Pos3d getPMax (void) const
 
Pos3d getPMin (void) const
 
BND3d Bnd (void) const
 Return the boundary of the object.
 
virtual bool In (const Pos3d &p, const double &tol=0.0) const
 Return true if point lies inside the object.
 
virtual bool Out (const Pos3d &p, const double &tol=0.0) const
 Return true if the point lies outside the object.
 
virtual GEOM_FT getCenterOfMassFactor (void) const
 Return the factor used for the computation of the center of mass (1.0 by default). More...
 
virtual GEOM_FT Pxy (void) const
 
virtual GEOM_FT Pxz (void) const
 
virtual GEOM_FT Pyz (void) const
 
GEOM_FT I (const unsigned short int &i, const unsigned short int &j) const
 
virtual GEOM_FT IArea (void) const
 
GEOM_FT I (const Pos3d &O, const Vector3d &e) const
 Return el moment of inertia with respect to the axis that passes through O with the direction of e. More...
 
GEOM_FT I (const Line3d &r) const
 Return el moment of inertia with respect to the argument line.
 
GEOM_FT I (const unsigned short int i, const unsigned short int j, const Pos3d &o) const
 Return el moment of inertia (i,j) respect to the axis parallel to i through o. More...
 
GEOM_FT IO (const Pos3d &o) const
 Return the polar moment of inertia with respect to the point o.
 
FT_matrix I (void) const
 Return the inertia tensor with respect to the center of mass of the object. More...
 
FT_matrix I (const Pos3d &o) const
 Return the inertia tensor with respect to the point o.
 
- Public Member Functions inherited from GeomObj
 GeomObj (void)
 Constructor.
 
virtual bool hasCenterOfMass (void) const
 Return true if the object has a center of mass.
 
GEOM_FT getCenterOfMassArea (void) const
 Return the dimension used to compute the center of mass, as follows: More...
 
virtual void Plot (Plotter &) const
 
- Public Member Functions inherited from ProtoGeom
 ProtoGeom (void)
 False when solution is not possible: intersection of parallel planes. More...
 
void setExists (bool e)
 
bool exists (void) const
 
boost::python::dict getPyDict (void) const
 Return a Python dictionary with the object members values.
 
void setPyDict (const boost::python::dict &)
 Set the values of the object members from a Python dictionary.
 
- Public Member Functions inherited from CommandEntity
 CommandEntity (CommandEntity *owr=nullptr)
 Default constructor.
 
CommandEntityOwner (void)
 Return a pointer to the object owner.
 
const CommandEntityOwner (void) const
 Return un puntero al objeto propietario de ESTE.
 
const StandardOutputWrappergetStandardOutputWrapper (void) const
 Return the regular output stream wrapper.
 
StandardOutputWrappergetStandardOutputWrapper (void)
 Return the regular output stream wrapper.
 
const std::string & getLogFileName (void) const
 Returns log file name.
 
void setLogFileName (const std::string &)
 Sets log file name.
 
const std::string & getErrFileName (void) const
 Returns err file name.
 
void setErrFileName (const std::string &)
 Sets error file name.
 
const std::string & getOutputFileName (void) const
 Returns regular output file name.
 
void setOutputFileName (const std::string &)
 Sets regular output file name.
 
boost::python::object evalPy (boost::python::object dict, const std::string &)
 Return the Python object that results from evaluating the argument.
 
boost::python::object execPy (boost::python::object dict, const std::string &)
 Return the Python objects that results from executing the code in the string argument.
 
boost::python::object execFilePy (boost::python::object dict, const std::string &)
 Return the Python object that results from executing the code in the file.
 
- Public Member Functions inherited from EntityWithProperties
 EntityWithProperties (EntityWithProperties *owr=nullptr)
 Default constructor.
 
void clearPyProps (void)
 Clear python properties map.
 
bool hasPyProp (const std::string &)
 Returns true if property exists.
 
boost::python::object getPyProp (const std::string &str)
 Return the Python object with the name being passed as parameter.
 
void setPyProp (std::string str, boost::python::object val)
 Sets/appends a value tho the Python object's dictionary.
 
void copyPropsFrom (const EntityWithProperties &)
 Copy the properties from the argument.
 
boost::python::list getPropNames (void) const
 Return the names of the object properties weightings.
 
const PythonDict & getPropertiesDict (void) const
 Return a std::map container with the properties of the object.
 
boost::python::dict getPyDict (void) const
 Return a Python dictionary containing the object members values.
 
void setPyDict (const boost::python::dict &)
 Set the values of the object members from a Python dictionary.
 
- Public Member Functions inherited from EntityWithOwner
 EntityWithOwner (EntityWithOwner *owr=nullptr)
 Default constructor.
 
 EntityWithOwner (const EntityWithOwner &)
 Copy constructor.
 
EntityWithOwneroperator= (const EntityWithOwner &)
 Assignment operator.
 
virtual bool operator== (const EntityWithOwner &) const
 Comparison operator.
 
virtual ~EntityWithOwner (void)
 Virtual destructor.
 
virtual std::string getClassName (void) const
 Returns demangled class name.
 
void set_owner (EntityWithOwner *owr)
 Assigns the owner of the object.
 
EntityWithOwnerOwner (void)
 
const EntityWithOwnerOwner (void) const
 

Protected Member Functions

 Polyhedron3d (const CGPolyhedron_3 &cgp)
 
void make_tetrahedron (const Pos3d &p0, const Pos3d &p1, const Pos3d &p2, const Pos3d &p3)
 
void make_tetrahedron (const HalfSpace3d &, const HalfSpace3d &, const HalfSpace3d &, const HalfSpace3d &)
 
void make_polyhedron (const std::deque< HalfSpace3d > &)
 
- Protected Member Functions inherited from CommandEntity
template<class T >
void string_to (T &, const std::string &) const
 
- Protected Member Functions inherited from EntityWithProperties
bool isEqual (const EntityWithProperties &) const
 Return true if both objects are equal.
 
- Protected Member Functions inherited from EntityWithOwner
virtual bool isEqual (const EntityWithOwner &) const
 Return true if both objects are equal.
 

Protected Attributes

CGPolyhedron_3 cgpolyhedron
 

Friends

Polyhedron3d Union (const Polyhedron3d &a, const Polyhedron3d &b)
 Union of the polyhedron arguments.
 
Polyhedron3d intersection (const Polyhedron3d &a, const Polyhedron3d &b)
 Intersection of the polyhedrons.
 
Polyhedron3d Diferencia (const Polyhedron3d &a, const Polyhedron3d &b)
 Difference of the polyhedrons.
 
Polyhedron3d subdivide_quad_triangle (const Polyhedron3d &pol, bool smooth_boundary)
 
template<class InputIterator >
Polyhedron3d get_convex_hull (InputIterator first, InputIterator last)
 

Additional Inherited Members

- Static Public Member Functions inherited from CommandEntity
static void resetStandardOutput (void)
 Reset the standard output streams to its defaults buffers.
 
- Static Public Member Functions inherited from EntityWithOwner
static int getVerbosityLevel (void)
 Get the value of the verbosity level.
 
static void setVerbosityLevel (const int &)
 Set the value of the verbosity level.
 
- Static Protected Member Functions inherited from CommandEntity
static CommandEntityentcmd_cast (boost::any &data)
 
- Static Protected Attributes inherited from EntityWithOwner
static int verbosity = 1
 Object that owns THIS ONE. More...
 

Detailed Description

Base class for polyhedrons in a three-dimensional space.

Member Function Documentation

◆ dist()

virtual GEOM_FT Polyhedron3d::dist ( const Pos3d p) const
inlinevirtual

Return the distance to the point (negative if the point is inside the solid).

◆ PseudoDist()

GEOM_FT Polyhedron3d::PseudoDist ( const Pos3d p) const

Return the SIGNED distance from the point to the tetrahedron.

The distance is computed as the maximum of the distances from the point to each of the planes that limit the tetrahedron.

◆ TocaCuadrante()

bool Polyhedron3d::TocaCuadrante ( const int &  cuadrante) const

Return verdadero si alguno de los vertices toca el cuadrante que se pasa como parĂ¡metro.


The documentation for this class was generated from the following files: