Polygon Crucher SDK - Documentation
Documentation
Loading...
Searching...
No Matches
CFaceTagger Class Referenceabstract

CFaceTagger is the base class that allows to gather face together using C3DFaceList::TagFaces. More...

Detailed Description

CFaceTagger is the base class that allows to gather face together using C3DFaceList::TagFaces.

Derive this class to have your own control on the way face are gathered together.

#include <FaceList.h>

Public Member Functions

virtual bool InitProcess (CGeomInfo *info)
 Default implementation return true.
 
virtual void EndProcess (unsigned int createdGroup)
 Default implementation does nothing.
 
virtual void BeginNewGroup (unsigned int groupnbr, unsigned int firstface)
 BeginNewGroup is called when a new group is to be created.
 
virtual void ProcessGroup (const int *faces, unsigned int size)=0
 ProcessGroup validates a group of face that belong to the same group.
 
BelongToGroup check if some faces belong to the #face group

You decide if a face belong to a group or not using your own criteria and goal

  • Returns false if the given face should not belong to #face group
  • Returns true if it belongs to #face group
    You can exclude some of the provided faces to be part of the group. In such case simply set faces[i] = -1
    Faces you let belong to the group will be enqueued, so you'll be asked by propagation if their connections belong to the same group too.
    Faces you exclude from the group will be excluded from the group but process laterly in a different group.

  • The default implementation returns true, without excluding any faces to belong to the group.
    Doing that all connected faces belong to the group.
    This implementation automatically creates group of faces connected by edges, or group of faces connected by points
  • If you return false, following your own criteria, a new group will begin and the process continue until all faces have been assigned to its specific group.
virtual bool BelongToGroup (unsigned int face, C3DEdge &edge, int *faces, unsigned int size)
 Called when exploreByEdge= true in C3DFaceList::TagFaces.
faces is an array of size face indexes connected by an edge to face.
Return true by default.
 
virtual bool BelongToGroup (unsigned int face, unsigned int point, int *faces, unsigned int size)
 Called when exploreByEdge= false. faces is an array of size face indexes connected to faces points.
C3DFaceList::TagFaces.
Return true by default.
 

Member Function Documentation

◆ BeginNewGroup()

virtual void CFaceTagger::BeginNewGroup ( unsigned int  groupnbr,
unsigned int  firstface 
)
virtual

BeginNewGroup is called when a new group is to be created.

Groupnbr is the number of the group, firstface is the first face of the group default implementation does nothing

◆ ProcessGroup()

virtual void CFaceTagger::ProcessGroup ( const int faces,
unsigned int  size 
)
pure virtual

ProcessGroup validates a group of face that belong to the same group.

This group contains size elements


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