// This file is generated by WOK (CPPExt). // Please do not edit this file; modify original file instead. // The copyright and license terms as defined for the original file apply to // this header file considered to be the "object code" form of the original source. #ifndef _MAT2d_MiniPath_HeaderFile #define _MAT2d_MiniPath_HeaderFile #ifndef _Standard_HeaderFile #include #endif #ifndef _Standard_Macro_HeaderFile #include #endif #ifndef _MAT2d_DataMapOfIntegerSequenceOfConnexion_HeaderFile #include #endif #ifndef _MAT2d_DataMapOfIntegerConnexion_HeaderFile #include #endif #ifndef _MAT2d_SequenceOfConnexion_HeaderFile #include #endif #ifndef _Standard_Real_HeaderFile #include #endif #ifndef _Standard_Integer_HeaderFile #include #endif #ifndef _Standard_Boolean_HeaderFile #include #endif #ifndef _Handle_MAT2d_Connexion_HeaderFile #include #endif class MAT2d_SequenceOfSequenceOfGeometry; class MAT2d_SequenceOfConnexion; class MAT2d_Connexion; //! MiniPath computes a path to link all the lines in
//! a set of lines. The path is described as a set of
//! connexions.
//!
//! The set of connexions can be seen as an arbitrary Tree.
//! The node of the tree are the lines. The arcs of the
//! tree are the connexions. The ancestror of a line is
//! the connexion which ends on it. The children of a line
//! are the connexions which start on it.
//!
//! The children of a line are ordered by the relation
//! defined on the connexions.
//! (See MAT2s_Connexion.cdl).
class MAT2d_MiniPath { public: void* operator new(size_t,void* anAddress) { return anAddress; } void* operator new(size_t size) { return Standard::Allocate(size); } void operator delete(void *anAddress) { if (anAddress) Standard::Free((Standard_Address&)anAddress); } Standard_EXPORT MAT2d_MiniPath(); //! Computes the path to link the lines in
.
//! the path starts on the line of index
//! = True if the Circuit turns in the
//! trigonometric sense.
Standard_EXPORT void Perform(const MAT2d_SequenceOfSequenceOfGeometry& Figure,const Standard_Integer IndStart,const Standard_Boolean Sense) ; //! Run on the set of connexions to compute the path.
//! the path is an exploration of the tree which contains
//! the connexions and their reverses.
//! if the tree of connexions is
//! A
//! / \
//! B E
//! / \ \
//! C D F
//!
//! the path is A->B, B->C, C->B, B->D, D->B, B->A, A->E,
//! E->F, F->E, E->A.
Standard_EXPORT void RunOnConnexions() ; //! Returns the sequence of connexions corresponding to
//! the path.
Standard_EXPORT const MAT2d_SequenceOfConnexion& Path() const; //! Returns if there is one Connexion which starts
//! on line designed by .
Standard_EXPORT Standard_Boolean IsConnexionsFrom(const Standard_Integer Index) const; //! Returns the connexions which start on line
//! designed by .
//!
Standard_EXPORT MAT2d_SequenceOfConnexion& ConnexionsFrom(const Standard_Integer Index) ; //! Returns if the line designed by is
//! the root.
Standard_EXPORT Standard_Boolean IsRoot(const Standard_Integer Index) const; //! Returns the connexion which ends on line
//! designed by .
Standard_EXPORT Handle_MAT2d_Connexion Father(const Standard_Integer Index) ; protected: private: //! Add a connexion to the path.
Standard_EXPORT void Append(const Handle(MAT2d_Connexion)& Connexion) ; Standard_EXPORT void ExploSons(MAT2d_SequenceOfConnexion& aPath,const Handle(MAT2d_Connexion)& aConnexion) ; //! Returns the connexion which realises the minimum of
//! distance between the lines of index and in
//! . The connexion is oriented from to .
Standard_EXPORT Handle_MAT2d_Connexion MinimumL1L2(const MAT2d_SequenceOfSequenceOfGeometry& Figure,const Standard_Integer L1,const Standard_Integer L2) const; MAT2d_DataMapOfIntegerSequenceOfConnexion theConnexions; MAT2d_DataMapOfIntegerConnexion theFather; MAT2d_SequenceOfConnexion thePath; Standard_Real theDirection; Standard_Integer indStart; }; // other Inline functions and methods (like "C++: function call" methods) #endif