SculptPointPolysIterator Class Reference 雕刻

| Library » Sculpt Brush

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

构造函数 & 析构函数文档编制

◆  SculptPointPolysIterator()

SculptPointPolysIterator () private

◆  ~SculptPointPolysIterator()

~ SculptPointPolysIterator () private

成员函数文档编制

◆  Alloc()

static SculptPointPolysIterator * Alloc ( )
static

Allocates a SculptPointPolysIterator object. Destroy the allocated SculptPointPolysIterator object with Free() 。使用 AutoAlloc to automate the allocation and destruction based on scope.

返回
The allocated SculptPointPolysIterator object, or nullptr if the allocation failed.

◆  Free()

static void Free ( SculptPointPolysIterator *&  itr )
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.

◆  Init()

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.
返回
true if successful, otherwise false .

◆  Next()

void Next ( )

Moves to the next polygon that is connected to the vertex.

◆  IsValid()

Bool IsValid ( )

After calling Next() checks if the polygon is valid. If it is valid then call GetPolygon() and GetIndex() .

返回
true if the polygon is valid, otherwise false .

◆  GetPolygon()

CPolygon GetPolygon ( )

Gets the current CPolygon connected to the vertex that the iterator is pointing to.

返回
The current CPolygon .

◆  GetIndex()

Int32 GetIndex ( )

Gets the index of the current polygon.

注意
This is the index of the polygon in the PolygonObject at the SculptObject current subdivision level, which can be accessed calling BrushDabData::GetPolygonObject() .
返回
The index of the polygon.
CPolygon GetPolygon()
BaseDocument * GetActiveDocument(void)
Represents a polygon that can be either a triangle or a quadrangle.
定义: c4d_baseobject.h:43
SculptObject * GetSelectedSculptObject(BaseDocument *doc, Bool includeHiddenObjects=false)
Bool IsValid()
定义: lib_sculpt.h:442
void Next()
Moves to the next polygon that is connected to the vertex.
定义: ge_autoptr.h:36
Bool Init(const SculptObject *pObj, Int32 vertex)