EdgeClusterList Class Reference

EdgeClusterList Class Reference

#include <meshadj.h>

Class Description

See also
Class Mesh.

Description:
This is a list of edge "clusters" for a given mesh. A typical application would be in Edit(able) Mesh, where the user has selected a two separate groups of edges on different parts of the mesh and wants to extrude them both, or rotate both around their local centers. Each "cluster" is a contiguous group of selected edges. Like AdjEdgeLists and AdjFaceLists, this class is only defined in relation to some mesh.

Note: for construction of this list, an edge is considered selected on both sides if it's selected on either. If you select the diagonal on top of a box, you probably only selected one of (face 2, edge 2 = 8) or (face 3, edge 2 = 11). But edges 8 and 11 will both be in the same cluster.
Data Members:
DWORDTab clust;

The cluster IDs of all the edges – this table has size mesh::numFaces*3. clust[i] is UNDEFINED if edge i is not in any cluster (ie is totally unselected).

DWORD count;

The number of clusters.
+ Inheritance diagram for EdgeClusterList:

Public Member Functions

DllExport EdgeClusterList (Mesh &mesh, BitArray &esel, AdjEdgeList &adj)
 
DWORD ID (int f, int e)
 
DWORD operator[] (int i)
 
DllExport void MakeVertCluster (Mesh &mesh, Tab< DWORD > &vclust)
 
DllExport void GetNormalsCenters (Mesh &mesh, Tab< Point3 > &norm, Tab< Point3 > &ctr)
 

Public Attributes

DWORDTab clust
 
DWORD count
 

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 

Constructor & Destructor Documentation

DllExport EdgeClusterList ( Mesh mesh,
BitArray esel,
AdjEdgeList adj 
)
Remarks
Constructor.

Creates an edge cluster list from the current selection. All adjacent selected edges are grouped into the same cluster.
Parameters:
Mesh &mesh

The mesh associated with this EdgeClusterList.

BitArray &esel

The bit array containing the edge selection data for the mesh.

AdjEdgeList &adj

The adjacent edge list for the mesh.

Member Function Documentation

DWORD ID ( int  f,
int  e 
)
inline
Remarks
Returns the cluster ID for face f, edge e.
Parameters:
int f

The index of the face in the mesh.

int e

The index of the edge in the mesh.
504 {return clust[f*3+e];}
DWORDTab clust
Definition: meshadj.h:484
DWORD operator[] ( int  i)
inline
Remarks
Access operator. Returns the cluster ID for edge i (indexed as 3*face+edge).
507 {return clust[i];}
DWORDTab clust
Definition: meshadj.h:484
DllExport void MakeVertCluster ( Mesh mesh,
Tab< DWORD > &  vclust 
)
Remarks
Creates a list of cluster IDs for vertices.
Parameters:
Mesh &mesh

The mesh associated with this EdgeClusterList.

Tab<DWORD> & vclust

This is where the output goes: vclust is set to size mesh.numVerts, and the value of each entry in this table tells which cluster the vertex has been assigned to, based on the edges it's on. If vertex "v" is not in any clusters (ie none of the edges that use it are in any clusters), vclust[v] is UNDEFINED.
DllExport void GetNormalsCenters ( Mesh mesh,
Tab< Point3 > &  norm,
Tab< Point3 > &  ctr 
)
Remarks
This method extracts normal and center information for the various clusters of the mesh.
Parameters:
Mesh &mesh

The mesh to evaluate.

Tab<Point3> & norm

This table has its sizes set to the number of clusters in the cluster list. Normals are computed as the normalized average of the area-normal vectors of all faces in the cluster.

Tab<Point3> & ctr

This table has its sizes set to the number of clusters in the cluster list. Centers are the average location of the face centers or edge centers – thus a point on three faces or edges in the same cluster has more weight than a point on one face in the cluster.

Member Data Documentation

DWORDTab clust
DWORD count