Open CASCADE Technology  7.9.3
Public Member Functions | Protected Member Functions | Protected Attributes
RWMesh_ShapeIterator Class Referenceabstract

This is a virtual base class for other shape iterators. Provides an abstract interface for iterating over the elements of a shape. It defines a set of pure virtual methods that must be implemented by derived classes to handle specific types of shapes and their elements. More...

#include <RWMesh_ShapeIterator.hxx>

Inheritance diagram for RWMesh_ShapeIterator:
Inheritance graph
[legend]

Public Member Functions

const TopoDS_ShapeExploredShape () const
 Return explored shape. More...
 
virtual const TopoDS_ShapeShape () const =0
 Return shape. More...
 
virtual bool More () const =0
 Return true if iterator points to the valid triangulation. More...
 
virtual void Next ()=0
 Find next value. More...
 
virtual bool IsEmpty () const =0
 Return true if mesh data is defined. More...
 
const XCAFPrs_StyleStyle () const
 Return shape material. More...
 
bool HasColor () const
 Return TRUE if shape color is set. More...
 
const Quantity_ColorRGBAColor () const
 Return shape color. More...
 
virtual Standard_Integer ElemLower () const =0
 Lower element index in current triangulation. More...
 
virtual Standard_Integer ElemUpper () const =0
 Upper element index in current triangulation. More...
 
virtual Standard_Integer NbNodes () const =0
 Return number of nodes for the current shape. More...
 
virtual Standard_Integer NodeLower () const =0
 Lower node index in current shape. More...
 
virtual Standard_Integer NodeUpper () const =0
 Upper node index in current shape. More...
 
gp_Pnt NodeTransformed (const Standard_Integer theNode) const
 Return the node with specified index with applied transformation. More...
 

Protected Member Functions

virtual gp_Pnt node (const Standard_Integer theNode) const =0
 Return the node with specified index with applied transformation. More...
 
 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. More...
 
 RWMesh_ShapeIterator (const TopoDS_Shape &theShape, const TopAbs_ShapeEnum theShapeTypeFind, const TopAbs_ShapeEnum theShapeTypeAvoid, const XCAFPrs_Style &theStyle=XCAFPrs_Style())
 Auxiliary constructor. More...
 
void dispatchStyles (const TDF_Label &theLabel, const TopLoc_Location &theLocation, const XCAFPrs_Style &theStyle)
 Dispatch shape styles. More...
 
void resetShape ()
 Reset information for current shape. More...
 
void initShape ()
 Initialize shape properties. More...
 

Protected Attributes

NCollection_DataMap< TopoDS_Shape, XCAFPrs_Style, TopTools_ShapeMapHashermyStyles
 Shape -> Style map. More...
 
XCAFPrs_Style myDefStyle
 default style for shapes without dedicated style More...
 
Standard_Boolean myToMapColors
 flag to dispatch styles More...
 
TopExp_Explorer myIter
 shape explorer More...
 
TopLoc_Location myLocation
 current shape location More...
 
gp_Trsf myTrsf
 current shape transformation More...
 
XCAFPrs_Style myStyle
 current shape style More...
 
Quantity_ColorRGBA myColor
 current shape color More...
 
TopAbs_ShapeEnum myShapeType
 type of shape More...
 
Standard_Boolean myHasColor
 flag indicating that current shape has assigned color More...
 

Detailed Description

This is a virtual base class for other shape iterators. Provides an abstract interface for iterating over the elements of a shape. It defines a set of pure virtual methods that must be implemented by derived classes to handle specific types of shapes and their elements.

Constructor & Destructor Documentation

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() 
)
protected

Main constructor.

RWMesh_ShapeIterator::RWMesh_ShapeIterator ( const TopoDS_Shape theShape,
const TopAbs_ShapeEnum  theShapeTypeFind,
const TopAbs_ShapeEnum  theShapeTypeAvoid,
const XCAFPrs_Style theStyle = XCAFPrs_Style() 
)
protected

Auxiliary constructor.

Member Function Documentation

const Quantity_ColorRGBA& RWMesh_ShapeIterator::Color ( ) const
inline

Return shape color.

void RWMesh_ShapeIterator::dispatchStyles ( const TDF_Label theLabel,
const TopLoc_Location theLocation,
const XCAFPrs_Style theStyle 
)
protected

Dispatch shape styles.

virtual Standard_Integer RWMesh_ShapeIterator::ElemLower ( ) const
pure virtual

Lower element index in current triangulation.

Implemented in RWMesh_FaceIterator, RWMesh_EdgeIterator, and RWMesh_VertexIterator.

virtual Standard_Integer RWMesh_ShapeIterator::ElemUpper ( ) const
pure virtual

Upper element index in current triangulation.

Implemented in RWMesh_FaceIterator, RWMesh_EdgeIterator, and RWMesh_VertexIterator.

const TopoDS_Shape& RWMesh_ShapeIterator::ExploredShape ( ) const
inline

Return explored shape.

bool RWMesh_ShapeIterator::HasColor ( ) const
inline

Return TRUE if shape color is set.

void RWMesh_ShapeIterator::initShape ( )
protected

Initialize shape properties.

virtual bool RWMesh_ShapeIterator::IsEmpty ( ) const
pure virtual

Return true if mesh data is defined.

Implemented in RWMesh_FaceIterator, RWMesh_EdgeIterator, and RWMesh_VertexIterator.

virtual bool RWMesh_ShapeIterator::More ( ) const
pure virtual

Return true if iterator points to the valid triangulation.

Implemented in RWMesh_EdgeIterator, RWMesh_VertexIterator, and RWMesh_FaceIterator.

virtual Standard_Integer RWMesh_ShapeIterator::NbNodes ( ) const
pure virtual

Return number of nodes for the current shape.

Implemented in RWMesh_FaceIterator, RWMesh_EdgeIterator, and RWMesh_VertexIterator.

virtual void RWMesh_ShapeIterator::Next ( )
pure virtual

Find next value.

Implemented in RWMesh_EdgeIterator, RWMesh_VertexIterator, and RWMesh_FaceIterator.

virtual gp_Pnt RWMesh_ShapeIterator::node ( const Standard_Integer  theNode) const
protectedpure virtual

Return the node with specified index with applied transformation.

Implemented in RWMesh_FaceIterator, RWMesh_EdgeIterator, and RWMesh_VertexIterator.

virtual Standard_Integer RWMesh_ShapeIterator::NodeLower ( ) const
pure virtual

Lower node index in current shape.

Implemented in RWMesh_FaceIterator, RWMesh_EdgeIterator, and RWMesh_VertexIterator.

gp_Pnt RWMesh_ShapeIterator::NodeTransformed ( const Standard_Integer  theNode) const
inline

Return the node with specified index with applied transformation.

virtual Standard_Integer RWMesh_ShapeIterator::NodeUpper ( ) const
pure virtual

Upper node index in current shape.

Implemented in RWMesh_FaceIterator, RWMesh_EdgeIterator, and RWMesh_VertexIterator.

void RWMesh_ShapeIterator::resetShape ( )
inlineprotected

Reset information for current shape.

virtual const TopoDS_Shape& RWMesh_ShapeIterator::Shape ( ) const
pure virtual

Return shape.

Implemented in RWMesh_EdgeIterator, RWMesh_VertexIterator, and RWMesh_FaceIterator.

const XCAFPrs_Style& RWMesh_ShapeIterator::Style ( ) const
inline

Return shape material.

Field Documentation

Quantity_ColorRGBA RWMesh_ShapeIterator::myColor
protected

current shape color

XCAFPrs_Style RWMesh_ShapeIterator::myDefStyle
protected

default style for shapes without dedicated style

Standard_Boolean RWMesh_ShapeIterator::myHasColor
protected

flag indicating that current shape has assigned color

TopExp_Explorer RWMesh_ShapeIterator::myIter
protected

shape explorer

TopLoc_Location RWMesh_ShapeIterator::myLocation
protected

current shape location

TopAbs_ShapeEnum RWMesh_ShapeIterator::myShapeType
protected

type of shape

XCAFPrs_Style RWMesh_ShapeIterator::myStyle
protected

current shape style

NCollection_DataMap<TopoDS_Shape, XCAFPrs_Style, TopTools_ShapeMapHasher> RWMesh_ShapeIterator::myStyles
protected

Shape -> Style map.

Standard_Boolean RWMesh_ShapeIterator::myToMapColors
protected

flag to dispatch styles

gp_Trsf RWMesh_ShapeIterator::myTrsf
protected

current shape transformation


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