RobWorkProject  24.6.21-
Public Types | Public Member Functions | List of all members
QHull3D Class Reference

calculates the convex hull of a set of 3d points. More...

#include <QHull3D.hpp>

Inherits ConvexHull3D.

Public Types

typedef rw::core::Ptr< QHull3DPtr
 smart pointer type of this class
 
- Public Types inherited from ConvexHull3D
typedef rw::core::Ptr< ConvexHull3DPtr
 smart pointer type of this class
 

Public Member Functions

 QHull3D ()
 constructor
 
virtual ~QHull3D ()
 destructor
 
void rebuild (const std::vector< rw::math::Vector3D< double >> &vertices)
 rebuilts the hull More...
 
bool isInside (const rw::math::Vector3D< double > &vertex)
 test if the given vertex is inside the convex hull More...
 
double getMinDistOutside (const rw::math::Vector3D< double > &vertex)
 If the vertex is outside the convex hull the minimum distance to the convex hull is returned. If its not outside 0 is returned. More...
 
double getMinDistInside (const rw::math::Vector3D< double > &vertex)
 If the vertex is inside the convex hull the minimum distance to any of the half-spaces of the hull is returned. If its not inside 0 is returned. More...
 
rw::core::Ptr< rw::geometry::PlainTriMesh< rw::geometry::TriangleN1< double > > > toTriMesh ()
 create a plain trimesh from the hull facets More...
 
const std::vector< rw::math::Vector3D< double > > & getVertices () const
 Returns the vertices defining the convex hull.
 
const std::vector< rw::math::Vector3D< double > > & getPlaneNormals () const
 Returns the normals of the planes defining the convex hull.
 
const std::vector< double > & getPlaneOffsets () const
 Returns the offsets of the planes defining the convex hull.
 
- Public Member Functions inherited from ConvexHull3D
virtual ~ConvexHull3D ()
 destructor
 

Detailed Description

calculates the convex hull of a set of 3d points.

The GiftWrap convex hull algorithm is used, hence the class name.

Note
It is important that there are not multiple vertices at the same coordinates. Filter these away before using this convex hull calculation.

Member Function Documentation

◆ getMinDistInside()

double getMinDistInside ( const rw::math::Vector3D< double > &  vertex)
virtual

If the vertex is inside the convex hull the minimum distance to any of the half-spaces of the hull is returned. If its not inside 0 is returned.

Parameters
vertex
Returns
minimum distance to vertex

Implements ConvexHull3D.

◆ getMinDistOutside()

double getMinDistOutside ( const rw::math::Vector3D< double > &  vertex)
virtual

If the vertex is outside the convex hull the minimum distance to the convex hull is returned. If its not outside 0 is returned.

Parameters
vertex
Returns
minimum distance to vertex

Implements ConvexHull3D.

◆ isInside()

bool isInside ( const rw::math::Vector3D< double > &  vertex)
virtual

test if the given vertex is inside the convex hull

Implements ConvexHull3D.

◆ rebuild()

void rebuild ( const std::vector< rw::math::Vector3D< double >> &  vertices)
virtual

rebuilts the hull

Parameters
vertices

Implements ConvexHull3D.

◆ toTriMesh()

create a plain trimesh from the hull facets

Returns
the hull facets as a plain triangle mesh with normal information

Implements ConvexHull3D.


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