#include <lib_sculptbrush.h>
Iterates over all the polygons that are connected to a specified vertex.
SculptObject *pSculpt = GetSelectedSculptObject ( GetActiveDocument ()); AutoAlloc<SculptPointPolysIterator> itr; if (itr) { // Iterate over all the polygons connected to vertex 0 for (itr-> Init (pSculpt, 0); itr-> IsValid (); itr-> 下一 ()) { CPolygon poly = itr-> GetPolygon (); } }
公共成员函数 |
|
| Bool | Init (const SculptObject *pObj, Int32 vertex) |
| void | 下一 () |
| Bool | IsValid () |
| CPolygon | GetPolygon () |
| Int32 | GetIndex () |
静态公共成员函数 |
|
| static SculptPointPolysIterator * | Alloc () |
| static void | Free ( SculptPointPolysIterator *&itr) |
私有成员函数 |
|
| SculptPointPolysIterator () | |
| ~SculptPointPolysIterator () | |
|
|
|
static |
Allocates a SculptPointPolysIterator object. Destroy the allocated SculptPointPolysIterator object with Free() 。使用 AutoAlloc to automate the allocation and destruction based on scope.
|
static |
Destructs SculptPointPolysIterator objects allocated with Alloc() 。使用 AutoAlloc to automate the allocation and destruction based on scope.
| [in,out] | itr | The SculptPointPolysIterator object to destruct. If the pointer is nullptr nothing happens. The pointer is assigned nullptr afterwards. |
| Bool Init | ( | const SculptObject * | pObj , |
| Int32 | vertex | ||
| ) |
Initializes the SculptPointPolysIterator for the given SculptObject and vertex index.
| [in] | pObj | The SculptObject to iterate over the polygons for. The caller owns the pointed SculptObject . |
| [in] | vertex | The vertex to check for connected polygons. |
| void Next | ( | ) |
Moves to the next polygon that is connected to the vertex.
| Bool IsValid | ( | ) |
After calling Next() checks if the polygon is valid. If it is valid then call GetPolygon() and GetIndex() .
| CPolygon GetPolygon | ( | ) |
Gets the current CPolygon connected to the vertex that the iterator is pointing to.
| Int32 GetIndex | ( | ) |
Gets the index of the current polygon.