C3D Toolkit
Kernel - 117982, Vision - 2.9.2.2
|
Contours construction graph. More...
#include <contour_graph.h>
Public Member Functions | |
MpGraph () | |
Constructor. | |
MpGraph (MpLoop *init) | |
Constructor by loop. | |
MpGraph (RPArray< MpLoop > &init) | |
Constructor by a set of loops. | |
MpGraph (const MpGraph &) | |
Copy-constructor. | |
virtual | ~MpGraph () |
Destructor. | |
Functions for access to data. | |
size_t | GetLoopsCount () const |
Count of boundaries. | |
MpLoop * | GetLoop (size_t index) const |
Loop by index. More... | |
int | GetMode () const |
Traversal direction. | |
bool | GetPointIn (const RPArray< MbCurve > &curveList, SArray< MbCrossPoint > &cross, MbCartPoint &p, double epsilon=Math::LengthEps *c3d::METRIC_DELTA) const |
Get the point. More... | |
template<class CurvesArray , class CurvesArray2 > | |
void | GetUsedCurves (const CurvesArray &curveList, CurvesArray2 &usedCurves) |
Get used curves. More... | |
bool | GetLoopOrientation (size_t i) const |
The orientation of a loop by its index. More... | |
Functions for changing data. | |
void | AddLoop (MpLoop *newLoop) |
Add a new boundary of the face. | |
void | InsertLoop (MpLoop *newLoop) |
Add a new boundary of the face to the beginning of face list. | |
void | SetMode (int m) |
Set the traverse direction. | |
void | MakeContours (RPArray< MbContour > &contours) const |
Get loops' contours. | |
template<class CurvesArray > | |
void | SetAllName (const CurvesArray &curveList, MpGraph *g, std::map< const MbCurve *, ptrdiff_t > &curvesNames) |
Store unused edges. More... | |
template<class CurvesArray > | |
void | SetEdgeName (const CurvesArray &curveList, std::map< const MbCurve *, ptrdiff_t > &curvesNames) |
Give names to edges. More... | |
template<class ContourArray > | |
void | SetLoopsOrientation (const ContourArray &contourArray) |
Determine the contours' orientation. More... | |
void | ConvertEdgesParams (const SArray< ptrdiff_t > &unchangeCurve, const SArray< ptrdiff_t > &changeCurve, const RPArray< MbCurve > &curveList) const |
Convert edges' parameters to curves' parameters. More... | |
Transformation operations. | |
void | Transform (const MbMatrix &matr) |
Transformation. More... | |
void | Move (const MbVector &to) |
Move. More... | |
void | Rotate (const MbCartPoint &pnt, const MbDirection &angle) |
Rotate. More... | |
![]() | |
TapeBase (RegistrableRec regs=noRegistrable) | |
Constructor. | |
TapeBase (const TapeBase &) | |
Copy-constructor. | |
virtual | ~TapeBase () |
Destructor. | |
RegistrableRec | GetRegistrable () const |
Whether the stream class is registrable. | |
void | SetRegistrable (RegistrableRec regs=registrable) const |
Set the state of registration of the stream class. | |
virtual const char * | GetPureName (const VersionContainer &) const |
Get the class name. | |
virtual bool | IsFamilyRegistrable () const |
Whether the object belongs to a registrable family. | |
Contours construction graph.
Contours construction graph.
Contains list of boundaries - loops.
|
inline |
Loop by index.
Loop by index without check of index.
[in] | index | - The loop index. |
bool MpGraph::GetPointIn | ( | const RPArray< MbCurve > & | curveList, |
SArray< MbCrossPoint > & | cross, | ||
MbCartPoint & | p, | ||
double | epsilon = Math::LengthEps *c3d::METRIC_DELTA |
||
) | const |
Get the point.
Get the point for graph building.
[in] | curveList | - A set of curves (without coincidences) for creating the graph. |
[in] | cross | - Set of intersection points of curves from curveList. |
[out] | p | - The result is a two-dimensional point. |
void MpGraph::GetUsedCurves | ( | const CurvesArray & | curveList, |
CurvesArray2 & | usedCurves | ||
) |
Get used curves.
Get used curves and rename in compliance with the last ones.
[in] | curveList | - Set of curves. |
[out] | usedCurves | - The result are the used curves. |
Get used curves and rename in compliance with the last ones.
[in] | curveList | - Set of curves. |
[out] | usedCurves | - The result are the used curves. |
|
inline |
The orientation of a loop by its index.
The orientation of loop by its index without check of index.
[in] | i | - The loop index. |
void MpGraph::SetAllName | ( | const CurvesArray & | curveList, |
MpGraph * | g, | ||
std::map< const MbCurve *, ptrdiff_t > & | curvesNames | ||
) |
Store unused edges.
Store unused edges giving names for them.
[in] | curveList | - The list of unused curves for setting the names. |
[in] | g | - Graph for searching unused edges. If there is an edge by the names of an unused curve in the graph or its array of unused edges, then it is stored in the array of unused edges unusedEdges. |
[in] | curvesNames | - Curves names. |
Store unused edges giving names for them.
[in] | curveList | - The list of unused curves for setting the names. |
[in] | g | - Graph for searching unused edges. If there is an edge by the names of an unused curve in the graph or its array of unused edges, then it is stored in the array of unused edges unusedEdges. |
[in] | curvesNames | - Curves names. |
void MpGraph::SetEdgeName | ( | const CurvesArray & | curveList, |
std::map< const MbCurve *, ptrdiff_t > & | curvesNames | ||
) |
Give names to edges.
Give names to edges by the list of curves.
[in] | curveList | - The list of curves for naming. |
[in] | curvesNames | - Curves names. |
Give names to edges by the list of curves.
[in] | curveList | - The list of curves for naming. |
[in] | curvesNames | - Curves names. |
void MpGraph::SetLoopsOrientation | ( | const ContourArray & | contourArray | ) |
void MpGraph::ConvertEdgesParams | ( | const SArray< ptrdiff_t > & | unchangeCurve, |
const SArray< ptrdiff_t > & | changeCurve, | ||
const RPArray< MbCurve > & | curveList | ||
) | const |
Convert edges' parameters to curves' parameters.
Convert parameters of edges to parameters of curves if edges' curves are found in lists.
[in] | unchangeCurve | - List of curves' names for modification. |
[in] | changeCurve | - List of curves' names for modification. |
[in] | curveList | - List of curves for modification of parametrization. |
Transformation.
Transformation according to the matrix.
[in] | matr | - Transformation matrix. |
Move.
Move by a vector.
[in] | to | - Movement vector. |
void MpGraph::Rotate | ( | const MbCartPoint & | pnt, |
const MbDirection & | angle | ||
) |
Rotate.
Rotate at angle around a point.
[in] | pnt | - A point is a rotation center. |
[in] | angle | - A two-dimensional normalized vector determining the rotation angle. |