Open CASCADE Technology  7.6.0
Public Member Functions

Poly_Connect Class Reference

Provides an algorithm to explore, inside a triangulation, the adjacency data for a node or a triangle. Adjacency data for a node consists of triangles which contain the node. Adjacency data for a triangle consists of: More...

#include <Poly_Connect.hxx>

Public Member Functions

 Poly_Connect ()
 Constructs an uninitialized algorithm. More...
 
 Poly_Connect (const Handle< Poly_Triangulation > &theTriangulation)
 Constructs an algorithm to explore the adjacency data of nodes or triangles for the triangulation T. More...
 
void Load (const Handle< Poly_Triangulation > &theTriangulation)
 Initialize the algorithm to explore the adjacency data of nodes or triangles for the triangulation theTriangulation. More...
 
const Handle< Poly_Triangulation > & Triangulation () const
 Returns the triangulation analyzed by this tool. More...
 
Standard_Integer Triangle (const Standard_Integer N) const
 Returns the index of a triangle containing the node at index N in the nodes table specific to the triangulation analyzed by this tool. More...
 
void Triangles (const Standard_Integer T, Standard_Integer &t1, Standard_Integer &t2, Standard_Integer &t3) const
 Returns in t1, t2 and t3, the indices of the 3 triangles adjacent to the triangle at index T in the triangles table specific to the triangulation analyzed by this tool. Warning Null indices are returned when there are fewer than 3 adjacent triangles. More...
 
void Nodes (const Standard_Integer T, Standard_Integer &n1, Standard_Integer &n2, Standard_Integer &n3) const
 Returns, in n1, n2 and n3, the indices of the 3 nodes adjacent to the triangle referenced at index T in the triangles table specific to the triangulation analyzed by this tool. Warning Null indices are returned when there are fewer than 3 adjacent nodes. More...
 
void Initialize (const Standard_Integer N)
 Initializes an iterator to search for all the triangles containing the node referenced at index N in the nodes table, for the triangulation analyzed by this tool. The iterator is managed by the following functions: More...
 
Standard_Boolean More () const
 Returns true if there is another element in the iterator defined with the function Initialize (i.e. if there is another triangle containing the given node). More...
 
void Next ()
 Advances the iterator defined with the function Initialize to access the next triangle. Note: There is no action if the iterator is empty (i.e. if the function More returns false).-. More...
 
Standard_Integer Value () const
 Returns the index of the current triangle to which the iterator, defined with the function Initialize, points. This is an index in the triangles table specific to the triangulation analyzed by this tool. More...
 

Detailed Description

Provides an algorithm to explore, inside a triangulation, the adjacency data for a node or a triangle. Adjacency data for a node consists of triangles which contain the node. Adjacency data for a triangle consists of:

Constructor & Destructor Documentation

◆ Poly_Connect() [1/2]

Poly_Connect::Poly_Connect ( )

Constructs an uninitialized algorithm.

◆ Poly_Connect() [2/2]

Poly_Connect::Poly_Connect ( const Handle< Poly_Triangulation > &  theTriangulation)

Constructs an algorithm to explore the adjacency data of nodes or triangles for the triangulation T.

Member Function Documentation

◆ Initialize()

void Poly_Connect::Initialize ( const Standard_Integer  N)

Initializes an iterator to search for all the triangles containing the node referenced at index N in the nodes table, for the triangulation analyzed by this tool. The iterator is managed by the following functions:

  • More, which checks if there are still elements in the iterator
  • Next, which positions the iterator on the next element
  • Value, which returns the current element. The use of such an iterator provides direct access to the triangles around a particular node, i.e. it avoids iterating on all the component triangles of a triangulation. Example Poly_Connect C(Tr); for (C.Initialize(n1);C.More();C.Next()) { t = C.Value(); }

◆ Load()

void Poly_Connect::Load ( const Handle< Poly_Triangulation > &  theTriangulation)

Initialize the algorithm to explore the adjacency data of nodes or triangles for the triangulation theTriangulation.

◆ More()

Standard_Boolean Poly_Connect::More ( void  ) const
inline

Returns true if there is another element in the iterator defined with the function Initialize (i.e. if there is another triangle containing the given node).

◆ Next()

void Poly_Connect::Next ( )

Advances the iterator defined with the function Initialize to access the next triangle. Note: There is no action if the iterator is empty (i.e. if the function More returns false).-.

◆ Nodes()

void Poly_Connect::Nodes ( const Standard_Integer  T,
Standard_Integer n1,
Standard_Integer n2,
Standard_Integer n3 
) const
inline

Returns, in n1, n2 and n3, the indices of the 3 nodes adjacent to the triangle referenced at index T in the triangles table specific to the triangulation analyzed by this tool. Warning Null indices are returned when there are fewer than 3 adjacent nodes.

◆ Triangle()

Standard_Integer Poly_Connect::Triangle ( const Standard_Integer  N) const
inline

Returns the index of a triangle containing the node at index N in the nodes table specific to the triangulation analyzed by this tool.

◆ Triangles()

void Poly_Connect::Triangles ( const Standard_Integer  T,
Standard_Integer t1,
Standard_Integer t2,
Standard_Integer t3 
) const
inline

Returns in t1, t2 and t3, the indices of the 3 triangles adjacent to the triangle at index T in the triangles table specific to the triangulation analyzed by this tool. Warning Null indices are returned when there are fewer than 3 adjacent triangles.

◆ Triangulation()

const Handle< Poly_Triangulation >& Poly_Connect::Triangulation ( ) const
inline

Returns the triangulation analyzed by this tool.

◆ Value()

Standard_Integer Poly_Connect::Value ( void  ) const
inline

Returns the index of the current triangle to which the iterator, defined with the function Initialize, points. This is an index in the triangles table specific to the triangulation analyzed by this tool.


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