Open CASCADE Technology 7.9.0
 
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Loading...
Searching...
No Matches
RWMesh_FaceIterator Class Reference

Auxiliary class to iterate through triangulated faces. Class is designed to provide an interface for iterating over the faces of a shape, specifically focusing on triangulated faces. It inherits from the RWMesh_ShapeIterator base class and extends its functionality to handle faces with triangulation data. More...

#include <RWMesh_FaceIterator.hxx>

Inheritance diagram for RWMesh_FaceIterator:

Public Member Functions

 RWMesh_FaceIterator (const TDF_Label &theLabel, const TopLoc_Location &theLocation, const Standard_Boolean theToMapColors=false, const XCAFPrs_Style &theStyle=XCAFPrs_Style())
 Main constructor.
 
 RWMesh_FaceIterator (const TopoDS_Shape &theShape, const XCAFPrs_Style &theStyle=XCAFPrs_Style())
 Auxiliary constructor.
 
bool More () const override
 Return true if iterator points to the valid triangulation.
 
void Next () override
 Find next value.
 
const TopoDS_FaceFace () const
 Return current face.
 
const TopoDS_ShapeShape () const override
 Return current face.
 
const Handle< Poly_Triangulation > & Triangulation () const
 Return current face triangulation.
 
bool IsEmptyMesh () const
 Return true if mesh data is defined.
 
bool IsEmpty () const override
 Return true if mesh data is defined.
 
const XCAFPrs_StyleFaceStyle () const
 Return face material.
 
bool HasFaceColor () const
 Return TRUE if face color is set.
 
const Quantity_ColorRGBAFaceColor () const
 Return face color.
 
Standard_Integer NbTriangles () const
 Return number of elements of specific type for the current face.
 
Standard_Integer ElemLower () const override
 Lower element index in current triangulation.
 
Standard_Integer ElemUpper () const override
 Upper element index in current triangulation.
 
Poly_Triangle TriangleOriented (Standard_Integer theElemIndex) const
 Return triangle with specified index with applied Face orientation.
 
bool HasNormals () const
 Return true if triangulation has defined normals.
 
bool HasTexCoords () const
 Return true if triangulation has defined normals.
 
gp_Dir NormalTransformed (Standard_Integer theNode) const
 Return normal at specified node index with face transformation applied and face orientation applied.
 
Standard_Integer NbNodes () const override
 Return number of nodes for the current face.
 
Standard_Integer NodeLower () const override
 Lower node index in current triangulation.
 
Standard_Integer NodeUpper () const override
 Upper node index in current triangulation.
 
gp_Pnt2d NodeTexCoord (const Standard_Integer theNode) const
 Return texture coordinates for the node.
 
gp_Pnt node (const Standard_Integer theNode) const override
 Return the node with specified index with applied transformation.
 
gp_Dir normal (Standard_Integer theNode) const
 Return normal at specified node index without face transformation applied.
 
Poly_Triangle triangle (Standard_Integer theElemIndex) const
 Return triangle with specified index.
 
- Public Member Functions inherited from RWMesh_ShapeIterator
const TopoDS_ShapeExploredShape () const
 Return explored shape.
 
const XCAFPrs_StyleStyle () const
 Return shape material.
 
bool HasColor () const
 Return TRUE if shape color is set.
 
const Quantity_ColorRGBAColor () const
 Return shape color.
 
gp_Pnt NodeTransformed (const Standard_Integer theNode) const
 Return the node with specified index with applied transformation.
 

Additional Inherited Members

- Protected Member Functions inherited from RWMesh_ShapeIterator
 RWMesh_ShapeIterator (const TDF_Label &theLabel, const TopLoc_Location &theLocation, const TopAbs_ShapeEnum theShapeTypeFind, const TopAbs_ShapeEnum theShapeTypeAvoid, const Standard_Boolean theToMapColors=false, const XCAFPrs_Style &theStyle=XCAFPrs_Style())
 Main constructor.
 
 RWMesh_ShapeIterator (const TopoDS_Shape &theShape, const TopAbs_ShapeEnum theShapeTypeFind, const TopAbs_ShapeEnum theShapeTypeAvoid, const XCAFPrs_Style &theStyle=XCAFPrs_Style())
 Auxiliary constructor.
 
void dispatchStyles (const TDF_Label &theLabel, const TopLoc_Location &theLocation, const XCAFPrs_Style &theStyle)
 Dispatch shape styles.
 
void resetShape ()
 Reset information for current shape.
 
void initShape ()
 Initialize shape properties.
 
- Protected Attributes inherited from RWMesh_ShapeIterator
NCollection_DataMap< TopoDS_Shape, XCAFPrs_Style, TopTools_ShapeMapHashermyStyles
 Shape -> Style map.
 
XCAFPrs_Style myDefStyle
 default style for shapes without dedicated style
 
Standard_Boolean myToMapColors
 flag to dispatch styles
 
TopExp_Explorer myIter
 shape explorer
 
TopLoc_Location myLocation
 current shape location
 
gp_Trsf myTrsf
 current shape transformation
 
XCAFPrs_Style myStyle
 current shape style
 
Quantity_ColorRGBA myColor
 current shape color
 
TopAbs_ShapeEnum myShapeType
 type of shape
 
Standard_Boolean myHasColor
 flag indicating that current shape has assigned color
 

Detailed Description

Auxiliary class to iterate through triangulated faces. Class is designed to provide an interface for iterating over the faces of a shape, specifically focusing on triangulated faces. It inherits from the RWMesh_ShapeIterator base class and extends its functionality to handle faces with triangulation data.

Constructor & Destructor Documentation

◆ RWMesh_FaceIterator() [1/2]

RWMesh_FaceIterator::RWMesh_FaceIterator ( const TDF_Label & theLabel,
const TopLoc_Location & theLocation,
const Standard_Boolean theToMapColors = false,
const XCAFPrs_Style & theStyle = XCAFPrs_Style() )

Main constructor.

Parameters
[in]theLabelLabel containing the face data
[in]theLocationLocation of the face
[in]theToMapColorsFlag to indicate if colors should be mapped
[in]theStyleStyle information for the face

◆ RWMesh_FaceIterator() [2/2]

RWMesh_FaceIterator::RWMesh_FaceIterator ( const TopoDS_Shape & theShape,
const XCAFPrs_Style & theStyle = XCAFPrs_Style() )

Auxiliary constructor.

Parameters
[in]theShapeShape containing the face data
[in]theStyleStyle information for the face

Member Function Documentation

◆ ElemLower()

Standard_Integer RWMesh_FaceIterator::ElemLower ( ) const
inlineoverridevirtual

Lower element index in current triangulation.

Implements RWMesh_ShapeIterator.

◆ ElemUpper()

Standard_Integer RWMesh_FaceIterator::ElemUpper ( ) const
inlineoverridevirtual

Upper element index in current triangulation.

Implements RWMesh_ShapeIterator.

◆ Face()

const TopoDS_Face & RWMesh_FaceIterator::Face ( ) const
inline

Return current face.

◆ FaceColor()

const Quantity_ColorRGBA & RWMesh_FaceIterator::FaceColor ( ) const
inline

Return face color.

◆ FaceStyle()

const XCAFPrs_Style & RWMesh_FaceIterator::FaceStyle ( ) const
inline

Return face material.

◆ HasFaceColor()

bool RWMesh_FaceIterator::HasFaceColor ( ) const
inline

Return TRUE if face color is set.

◆ HasNormals()

bool RWMesh_FaceIterator::HasNormals ( ) const
inline

Return true if triangulation has defined normals.

◆ HasTexCoords()

bool RWMesh_FaceIterator::HasTexCoords ( ) const
inline

Return true if triangulation has defined normals.

◆ IsEmpty()

bool RWMesh_FaceIterator::IsEmpty ( ) const
inlineoverridevirtual

Return true if mesh data is defined.

Implements RWMesh_ShapeIterator.

◆ IsEmptyMesh()

bool RWMesh_FaceIterator::IsEmptyMesh ( ) const
inline

Return true if mesh data is defined.

◆ More()

bool RWMesh_FaceIterator::More ( ) const
inlineoverridevirtual

Return true if iterator points to the valid triangulation.

Implements RWMesh_ShapeIterator.

◆ NbNodes()

Standard_Integer RWMesh_FaceIterator::NbNodes ( ) const
inlineoverridevirtual

Return number of nodes for the current face.

Implements RWMesh_ShapeIterator.

◆ NbTriangles()

Standard_Integer RWMesh_FaceIterator::NbTriangles ( ) const
inline

Return number of elements of specific type for the current face.

◆ Next()

void RWMesh_FaceIterator::Next ( )
overridevirtual

Find next value.

Implements RWMesh_ShapeIterator.

◆ node()

gp_Pnt RWMesh_FaceIterator::node ( const Standard_Integer theNode) const
inlineoverridevirtual

Return the node with specified index with applied transformation.

Implements RWMesh_ShapeIterator.

◆ NodeLower()

Standard_Integer RWMesh_FaceIterator::NodeLower ( ) const
inlineoverridevirtual

Lower node index in current triangulation.

Implements RWMesh_ShapeIterator.

◆ NodeTexCoord()

gp_Pnt2d RWMesh_FaceIterator::NodeTexCoord ( const Standard_Integer theNode) const
inline

Return texture coordinates for the node.

◆ NodeUpper()

Standard_Integer RWMesh_FaceIterator::NodeUpper ( ) const
inlineoverridevirtual

Upper node index in current triangulation.

Implements RWMesh_ShapeIterator.

◆ normal()

gp_Dir RWMesh_FaceIterator::normal ( Standard_Integer theNode) const

Return normal at specified node index without face transformation applied.

◆ NormalTransformed()

gp_Dir RWMesh_FaceIterator::NormalTransformed ( Standard_Integer theNode) const
inline

Return normal at specified node index with face transformation applied and face orientation applied.

◆ Shape()

const TopoDS_Shape & RWMesh_FaceIterator::Shape ( ) const
inlineoverridevirtual

Return current face.

Implements RWMesh_ShapeIterator.

◆ triangle()

Poly_Triangle RWMesh_FaceIterator::triangle ( Standard_Integer theElemIndex) const
inline

Return triangle with specified index.

◆ TriangleOriented()

Poly_Triangle RWMesh_FaceIterator::TriangleOriented ( Standard_Integer theElemIndex) const
inline

Return triangle with specified index with applied Face orientation.

◆ Triangulation()

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

Return current face triangulation.


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