politopix  5.0.0
PolyhedralBody< T > Class Template Reference

Generic class to run computations whether we have, polytopes, capped polytopes, prismatic polyhedra, ... More...

#include <politopixAPI.h>

Collaboration diagram for PolyhedralBody< T >:
Collaboration graph

Static Public Member Functions

static int sum (const boost::shared_ptr< T > &firstBody, const boost::shared_ptr< T > &secondBody, boost::shared_ptr< T > &result)
 
static int sum (const std::vector< boost::shared_ptr< T > > &allBodies, boost::shared_ptr< T > &result)
 
static int intersect (const boost::shared_ptr< T > &firstBody, const boost::shared_ptr< T > &secondBody, boost::shared_ptr< T > &result)
 
static int intersect (const std::vector< boost::shared_ptr< T > > &allBodies, boost::shared_ptr< T > &result)
 
static bool isIncluded (const boost::shared_ptr< T > &firstBody, const boost::shared_ptr< T > &secondBody)
 Test whether firstBody is inside secondBody. More...
 
static bool isIncluded (const boost::shared_ptr< T > &firstBody, const boost::shared_ptr< T > &secondBody, double &minmaxDistance)
 Test whether firstBody is inside secondBody. More...
 
static void resetConstantsOfAllHalfSpaces (boost::shared_ptr< T > &body, double cst)
 
static int scalingFactor (boost::shared_ptr< T > &body, double factor)
 
static bool checkTopologyAndGeometry (const boost::shared_ptr< T > &body)
 
static std::string getName ()
 
static std::string getFileExtension ()
 
static void save (const std::string &pathA, boost::shared_ptr< T > &body)
 
static void load (const std::string &pathA, boost::shared_ptr< T > &body, double bb_size=10000.)
 
static void dump (std::ostream &current_ostream, boost::shared_ptr< T > &body)
 

Detailed Description

template<class T>
class PolyhedralBody< T >

Generic class to run computations whether we have, polytopes, capped polytopes, prismatic polyhedra, ...

Definition at line 242 of file politopixAPI.h.

Member Function Documentation

◆ checkTopologyAndGeometry()

template<class T >
static bool PolyhedralBody< T >::checkTopologyAndGeometry ( const boost::shared_ptr< T > &  body)
inlinestatic

Definition at line 287 of file politopixAPI.h.

◆ dump()

template<class T >
static void PolyhedralBody< T >::dump ( std::ostream &  current_ostream,
boost::shared_ptr< T > &  body 
)
inlinestatic

Definition at line 307 of file politopixAPI.h.

◆ getFileExtension()

template<class T >
static std::string PolyhedralBody< T >::getFileExtension ( )
inlinestatic

Definition at line 295 of file politopixAPI.h.

◆ getName()

template<class T >
static std::string PolyhedralBody< T >::getName ( )
inlinestatic

Definition at line 291 of file politopixAPI.h.

◆ intersect() [1/2]

template<class T >
static int PolyhedralBody< T >::intersect ( const boost::shared_ptr< T > &  firstBody,
const boost::shared_ptr< T > &  secondBody,
boost::shared_ptr< T > &  result 
)
inlinestatic

Definition at line 254 of file politopixAPI.h.

◆ intersect() [2/2]

template<class T >
static int PolyhedralBody< T >::intersect ( const std::vector< boost::shared_ptr< T > > &  allBodies,
boost::shared_ptr< T > &  result 
)
inlinestatic

Definition at line 258 of file politopixAPI.h.

◆ isIncluded() [1/2]

template<class T >
static bool PolyhedralBody< T >::isIncluded ( const boost::shared_ptr< T > &  firstBody,
const boost::shared_ptr< T > &  secondBody 
)
inlinestatic

Test whether firstBody is inside secondBody.

Parameters
firstBody
secondBody
Returns
true if

\[ firstBody \subset secondBody \]

, false otherwise.

Definition at line 266 of file politopixAPI.h.

◆ isIncluded() [2/2]

template<class T >
static bool PolyhedralBody< T >::isIncluded ( const boost::shared_ptr< T > &  firstBody,
const boost::shared_ptr< T > &  secondBody,
double &  minmaxDistance 
)
inlinestatic

Test whether firstBody is inside secondBody.

Parameters
firstBody
secondBody
minmaxDistanceIf

\[ projectionVertices(firstBody) \not\subset secondBody \]

minmaxDistance is the minimum distance from firstBody to secondBody, otherwise it is the maximum distance shift to apply to the half-spaces of secondBody to include firstBody.
Returns
true if

\[ firstBody \subset secondBody \]

, false otherwise.

Definition at line 275 of file politopixAPI.h.

◆ load()

template<class T >
static void PolyhedralBody< T >::load ( const std::string &  pathA,
boost::shared_ptr< T > &  body,
double  bb_size = 10000. 
)
inlinestatic

Definition at line 303 of file politopixAPI.h.

◆ resetConstantsOfAllHalfSpaces()

template<class T >
static void PolyhedralBody< T >::resetConstantsOfAllHalfSpaces ( boost::shared_ptr< T > &  body,
double  cst 
)
inlinestatic

Definition at line 279 of file politopixAPI.h.

◆ save()

template<class T >
static void PolyhedralBody< T >::save ( const std::string &  pathA,
boost::shared_ptr< T > &  body 
)
inlinestatic

Definition at line 299 of file politopixAPI.h.

◆ scalingFactor()

template<class T >
static int PolyhedralBody< T >::scalingFactor ( boost::shared_ptr< T > &  body,
double  factor 
)
inlinestatic

Definition at line 283 of file politopixAPI.h.

◆ sum() [1/2]

template<class T >
static int PolyhedralBody< T >::sum ( const boost::shared_ptr< T > &  firstBody,
const boost::shared_ptr< T > &  secondBody,
boost::shared_ptr< T > &  result 
)
inlinestatic

Definition at line 246 of file politopixAPI.h.

◆ sum() [2/2]

template<class T >
static int PolyhedralBody< T >::sum ( const std::vector< boost::shared_ptr< T > > &  allBodies,
boost::shared_ptr< T > &  result 
)
inlinestatic

Definition at line 250 of file politopixAPI.h.


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