Public Member Functions | Static Public Member Functions | List of all members
mirtk::Polyhedron Class Reference

#include <Polyhedron.h>

Inheritance diagram for mirtk::Polyhedron:
Inheritance graph
Collaboration diagram for mirtk::Polyhedron:
Collaboration graph

Public Member Functions

void GetPoint (int, double &, double &, double &) const
 Get vertex position.
 
void GetPoint (int, double [3]) const
 Get vertex position.
 
Point GetPoint (int) const
 Get vertex position.
 
bool IsInside (double, double, double) const
 Test whether point is inside the polyhedron.
 
bool IsInside (double [3]) const
 Test whether point is inside the polyhedron.
 
bool IsInside (const Point &) const
 Test whether point is inside the polyhedron.
 
int NumberOfPoints () const
 Number of vertices.
 
Polyhedronoperator= (const Polyhedron &)
 Assignment operator.
 
 Polyhedron (vtkPolyData *=NULL)
 Constructor.
 
 Polyhedron (const Polyhedron &)
 Copy constructor.
 
double Volume () const
 Calculate volume enclosed by polyhedron.
 
int WindingNumber (double, double, double) const
 Compute winding number of polyhedron around given point.
 
int WindingNumber (double [3]) const
 Compute winding number of polyhedron around given point.
 
int WindingNumber (const Point &) const
 Compute winding number of polyhedron around given point.
 
virtual ~Polyhedron ()
 Destructor.
 
- Public Member Functions inherited from mirtk::Object
virtual const char * NameOfClass () const =0
 Get name of class, which this object is an instance of.
 
virtual ParameterList Parameter () const
 Get parameter name/value pairs.
 
bool Parameter (const ParameterList &)
 Set parameters from name/value pairs.
 
virtual bool Set (const char *name, const char *value)
 
virtual ~Object ()
 Destructor.
 

Static Public Member Functions

static bool IsInside (vtkPolyData *, double, double, double)
 Test whether point is inside the polyhedron.
 
static bool IsInside (vtkPolyData *, double [3])
 Test whether point is inside the polyhedron.
 
static bool IsInside (vtkPolyData *, const Point &)
 Test whether point is inside the polyhedron.
 
static double Volume (vtkPolyData *)
 Calculate volume enclosed by polyhedron.
 
static int WindingNumber (vtkPolyData *, double, double, double)
 Compute winding number of polyhedron around given point.
 
static int WindingNumber (vtkPolyData *, double [3])
 Compute winding number of polyhedron around given point.
 
static int WindingNumber (vtkPolyData *, const Point &)
 Compute winding number of polyhedron around given point.
 
- Static Public Member Functions inherited from mirtk::Object
static const char * NameOfType ()
 Get name of this class type.
 

Additional Inherited Members

- Protected Member Functions inherited from mirtk::Object
template<typename... Args>
void Throw (ErrorType err, const char *func, Args... args) const
 
- Static Protected Member Functions inherited from mirtk::Object
template<typename... Args>
static void ThrowStatic (ErrorType err, const char *cls, const char *func, Args... args)
 

Detailed Description

Utility functions for dealing with VTK polydata representing a polyhedron.

Note
The point-in-polyhedron test based on the winding number method and the polyhedron volume computation are a C++ implementation of the excellent polyhedron.py Python module of Mark Dickinson found on GitHub at https://github.com/mdickinson/polyhedron/blob/cd7361bcee8cbd9ef2e0aac58a7ce59bf9a52c4f/polyhedron.py

Definition at line 41 of file Polyhedron.h.


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