Med Memory Users' Guide 5.1.3

INTERP_KERNEL::QuadraticPolygon Class Reference

Inheritance diagram for INTERP_KERNEL::QuadraticPolygon:
Collaboration diagram for INTERP_KERNEL::QuadraticPolygon:

List of all members.

Public Member Functions

 QuadraticPolygon ()
 QuadraticPolygon (const QuadraticPolygon &other)
 QuadraticPolygon (const char *fileName)
 ~QuadraticPolygon ()
void closeMe () const
void circularPermute ()
void dumpInXfigFile (const char *fileName) const
void dumpInXfigFileWithOther (const ComposedEdge &other, const char *fileName) const
double intersectWithAbs (QuadraticPolygon &other)
double intersectWith (const QuadraticPolygon &other) const
double intersectWith (const QuadraticPolygon &other, double *barycenter) const
std::vector< QuadraticPolygon * > intersectMySelfWith (const QuadraticPolygon &other) const
void intersectForPerimeter (const QuadraticPolygon &other, double &perimeterThisPart, double &perimeterOtherPart, double &perimeterCommonPart) const
void intersectForPerimeterAdvanced (const QuadraticPolygon &other, std::vector< double > &polThis, std::vector< double > &polOther) const
void intersectForPoint (const QuadraticPolygon &other, std::vector< int > &numberOfCreatedPointsPerEdge) const
void performLocatingOperation (QuadraticPolygon &pol2) const
std::vector< QuadraticPolygon * > buildIntersectionPolygons (const QuadraticPolygon &pol1, const QuadraticPolygon &pol2) const
bool amIAChanceToBeCompletedBy (const QuadraticPolygon &pol1Splitted, const QuadraticPolygon &pol2NotSplitted, bool &direction)

Static Public Member Functions

static QuadraticPolygonbuildLinearPolygon (std::vector< Node * > &nodes)
static QuadraticPolygonbuildArcCirclePolygon (std::vector< Node * > &nodes)
static void buildDbgFile (const std::vector< Node * > &nodes, const char *fileName)
static void splitPolygonsEachOther (QuadraticPolygon &pol1, QuadraticPolygon &pol2, int &nbOfSplits)

Protected Member Functions

std::list< QuadraticPolygon * > zipConsecutiveInSegments () const
void dumpInXfigFile (std::ostream &stream, int resolution, const Bounds &box) const
void closePolygons (std::list< QuadraticPolygon * > &pol2Zip, const QuadraticPolygon &pol1, std::vector< QuadraticPolygon * > &results) const
std::list< QuadraticPolygon * >
::iterator 
fillAsMuchAsPossibleWith (const QuadraticPolygon &pol1Splitted, std::list< QuadraticPolygon * >::iterator iStart, std::list< QuadraticPolygon * >::iterator iEnd, bool direction)

Static Protected Member Functions

template<class EDGES >
static void updateNeighbours (const MergePoints &merger, IteratorOnComposedEdge it1, IteratorOnComposedEdge it2, const EDGES *e1, const EDGES *e2)
static std::list
< QuadraticPolygon * >
::iterator 
checkInList (Node *n, std::list< QuadraticPolygon * >::iterator iStart, std::list< QuadraticPolygon * >::iterator iEnd)

Constructor & Destructor Documentation

INTERP_KERNEL::QuadraticPolygon::QuadraticPolygon ( )
INTERP_KERNEL::QuadraticPolygon::QuadraticPolygon ( const QuadraticPolygon other)
QuadraticPolygon::QuadraticPolygon ( const char *  fileName)
QuadraticPolygon::~QuadraticPolygon ( )

Member Function Documentation

QuadraticPolygon * QuadraticPolygon::buildLinearPolygon ( std::vector< Node * > &  nodes) [static]
QuadraticPolygon * QuadraticPolygon::buildArcCirclePolygon ( std::vector< Node * > &  nodes) [static]
void QuadraticPolygon::buildDbgFile ( const std::vector< Node * > &  nodes,
const char *  fileName 
) [static]
void QuadraticPolygon::closeMe ( ) const
void QuadraticPolygon::circularPermute ( )
void QuadraticPolygon::dumpInXfigFile ( const char *  fileName) const
void QuadraticPolygon::dumpInXfigFileWithOther ( const ComposedEdge other,
const char *  fileName 
) const
double QuadraticPolygon::intersectWithAbs ( QuadraticPolygon other)

Before intersecting as intersectWith a normalization is done.

Warning contrary to intersectWith method this method is NOT const. 'this' and 'other' are modified after call of this method.

double QuadraticPolygon::intersectWith ( const QuadraticPolygon other) const

WARNING this method is const and other is const too. BUT location of Edges in 'this' and 'other' are nevertheless modified. This is possible because loc attribute in Edge class is mutable. This implies that if 'this' or/and 'other' are reused for intersect* method initLocations has to be called on each of this/them.

double QuadraticPolygon::intersectWith ( const QuadraticPolygon other,
double *  barycenter 
) const

WARNING this method is const and other is const too. BUT location of Edges in 'this' and 'other' are nevertheless modified. This is possible because loc attribute in Edge class is mutable. This implies that if 'this' or/and 'other' are reused for intersect* method initLocations has to be called on each of this/them.

std::vector< QuadraticPolygon * > QuadraticPolygon::intersectMySelfWith ( const QuadraticPolygon other) const

WARNING this method is const and other is const too. BUT location of Edges in 'this' and 'other' are nevertheless modified. This is possible because loc attribute in Edge class is mutable. This implies that if 'this' or/and 'other' are reused for intersect* method initLocations has to be called on each of this/them.

References buildIntersectionPolygons().

void QuadraticPolygon::intersectForPerimeter ( const QuadraticPolygon other,
double &  perimeterThisPart,
double &  perimeterOtherPart,
double &  perimeterCommonPart 
) const

WARNING this method is const and other is const too. BUT location of Edges in 'this' and 'other' are nevertheless modified. This is possible because loc attribute in Edge class is mutable. This implies that if 'this' or/and 'other' are reused for intersect* method initLocations has to be called on each of this/them.

References INTERP_KERNEL::ComposedEdge::dispatchPerimeterExcl(), and performLocatingOperation().

void QuadraticPolygon::intersectForPerimeterAdvanced ( const QuadraticPolygon other,
std::vector< double > &  polThis,
std::vector< double > &  polOther 
) const

WARNING this method is const and other is const too. BUT location of Edges in 'this' and 'other' are nevertheless modified. This is possible because loc attribute in Edge class is mutable. This implies that if 'this' or/and 'other' are reused for intersect* method initLocations has to be called on each of this/them.

polThis.size()==this->size() and polOther.size()==other.size(). For each ElementaryEdge of 'this', the corresponding contribution in resulting polygon is in 'polThis'. For each ElementaryEdge of 'other', the corresponding contribution in resulting polygon is in 'polOther'. As consequence common part are counted twice (in polThis and in polOther).

References INTERP_KERNEL::ElementaryEdge::clone(), INTERP_KERNEL::IteratorOnComposedEdge::current(), INTERP_KERNEL::ComposedEdge::dispatchPerimeter(), INTERP_KERNEL::IteratorOnComposedEdge::finished(), INTERP_KERNEL::IteratorOnComposedEdge::first(), INTERP_KERNEL::IteratorOnComposedEdge::next(), performLocatingOperation(), INTERP_KERNEL::ComposedEdge::pushBack(), and INTERP_KERNEL::ComposedEdge::size().

void QuadraticPolygon::intersectForPoint ( const QuadraticPolygon other,
std::vector< int > &  numberOfCreatedPointsPerEdge 
) const

numberOfCreatedPointsPerEdge is resized to the number of edges of 'this'. This method returns in ordered maner the number of newly created points per edge. This method performs a split process between 'this' and 'other' that gives the result PThis. Then for each edges of 'this' this method counts how many edges in Pthis have the same id.

References INTERP_KERNEL::ElementaryEdge::clone(), INTERP_KERNEL::IteratorOnComposedEdge::current(), INTERP_KERNEL::IteratorOnComposedEdge::finished(), INTERP_KERNEL::IteratorOnComposedEdge::first(), INTERP_KERNEL::IteratorOnComposedEdge::next(), INTERP_KERNEL::ComposedEdge::pushBack(), and INTERP_KERNEL::ComposedEdge::recursiveSize().

void QuadraticPolygon::splitPolygonsEachOther ( QuadraticPolygon pol1,
QuadraticPolygon pol2,
int &  nbOfSplits 
) [static]
std::vector< QuadraticPolygon * > QuadraticPolygon::buildIntersectionPolygons ( const QuadraticPolygon pol1,
const QuadraticPolygon pol2 
) const

Given 2 polygons 'pol1' and 'pol2' (localized) the resulting polygons are returned.

this : pol2 simplified.

Parameters:
pol1pol1 split.
pol2pol2 split.

References INTERP_KERNEL::FULL_IN_1, INTERP_KERNEL::FULL_ON_1, INTERP_KERNEL::ElementaryEdge::locateFullyMySelf(), and zipConsecutiveInSegments().

Referenced by intersectMySelfWith().

std::list< QuadraticPolygon * > QuadraticPolygon::zipConsecutiveInSegments ( ) const [protected]
void QuadraticPolygon::dumpInXfigFile ( std::ostream &  stream,
int  resolution,
const Bounds &  box 
) const [protected]

Reimplemented from INTERP_KERNEL::ComposedEdge.

void QuadraticPolygon::closePolygons ( std::list< QuadraticPolygon * > &  pol2Zip,
const QuadraticPolygon pol1,
std::vector< QuadraticPolygon * > &  results 
) const [protected]

'this' should be considered as pol2Simplified.

Parameters:
pol2zipis a list of set of edges (openned polygon) coming from split polygon 2.
pol1is split pol1.
resultsthe resulting CLOSED polygons.
std::list< QuadraticPolygon * >::iterator QuadraticPolygon::checkInList ( Node n,
std::list< QuadraticPolygon * >::iterator  iStart,
std::list< QuadraticPolygon * >::iterator  iEnd 
) [static, protected]