LVectorBase::EnumVertices

Summary

Enumerates all vertices within the vector handle.

Syntax

#include "ltwrappr.h"

virtual L_INT LVectorBase::EnumVertices(dwFlags=0)

Parameters

L_UINT32 dwFlags

Flags that determine which object's vertices to enumerate. Possible values are:

Value Meaning
0 Enumerate the vertices of all objects.
VECTOR_FLAGS_SELECTED_ONLY Enumerate the vertices of selected objects only.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

This function will enumerate all the vertices in the given vector.

Note: In DirectX, you cannot enumerate vertices, therefore this function will do nothing.

Required DLLs and Libraries

See Also

Functions

Topics

Example

class LMyVectorBase2EV: public LVectorBase 
{ 
public: 
   L_INT          m_nObjectCount ; 
 
public: 
   LMyVectorBase2EV(); 
   virtual ~LMyVectorBase2EV() ; 
   virtual L_INT EnumVerticesCallBack(pVECTORHANDLE pVector, pVECTORPOINT pPoint); 
}; 
 
LMyVectorBase2EV::LMyVectorBase2EV() 
{ 
   m_nObjectCount = 0 ; 
} 
 
LMyVectorBase2EV::~LMyVectorBase2EV() 
{ 
} 
 
 
L_INT LMyVectorBase2EV::EnumVerticesCallBack(pVECTORHANDLE pVector, pVECTORPOINT pPoint) 
{ 
   UNREFERENCED_PARAMETER(pVector); 
   UNREFERENCED_PARAMETER(pPoint); 
 
   m_nObjectCount++ ; 
   return SUCCESS ; 
} 
 
L_INT LVectorBase__EnumVerticesExample(HWND hWnd) 
{ 
   L_INT             nRet; 
   L_TCHAR           szTemp[100]; 
   LMyVectorBase2EV  Vector; 
 
   nRet = Vector.Load(MAKE_IMAGE_PATH(TEXT("random.dxf"))); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   //Get the total number of vertices 
   Vector.m_nObjectCount=0; 
 
   Vector.EnableCallBack (TRUE); 
 
   nRet = Vector.EnumVertices(); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   wsprintf(szTemp, TEXT("Total Vertices in Vector: %d\n"), Vector.m_nObjectCount); 
 
   MessageBox(hWnd, szTemp, TEXT(""), MB_OK); 
 
   return SUCCESS; 
} 
Help Version 22.0.2022.12.7
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Vector C++ Class Library Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.