Used for grouping faces in an MNMesh into clusters for applying transformations.
Depending on the constructor used, it may group faces into clusters based on minimal angles between faces, on face selections, or on both. The class contains a list of face "clusters" for a given mesh. A typical application would be in Editable Poly, where the user has selected two separate groups of faces 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 faces. This class is only defined in relation to some MNMesh.
For convenient caching, it is recommended that you use this class through the MNTempData class.
All methods of this class are implemented by the system.
#include <mnmesh.h>
Public Member Functions |
|
DllExport | MNFaceClusters (MNMesh &mesh, DWORD clusterFlags) |
Creates clusters from distinct selected
components. |
|
DllExport | MNFaceClusters (MNMesh &mesh, float angle, DWORD clusterFlags) |
This method will create face cluster lists
based on the specified
MNMesh. |
|
int | operator[] (int i) |
Index operator for accessing cluster data.
|
|
DllExport void | MakeVertCluster (MNMesh &mesh, Tab< int > &vclust) |
This method will create a table indicating
which face cluster each vertex in the mesh is in. |
|
DllExport void | GetNormalsCenters (MNMesh &mesh, Tab< Point3 > &norm, Tab< Point3 > &ctr) |
Computes average normals and centers for
each of the face clusters. |
|
DllExport void | GetBorder (MNMesh &mesh, int clustID, Tab< int > &cbord) |
This method will finds the edge list that
borders this cluster. |
|
DllExport void | GetOutlineVectors (MNMesh &m, Tab< Point3 > &cnorms, Tab< Point3 > &odir) |
This method will retrieve the "outline"
direction for the border of the cluster. |
|
Public Attributes |
|
Tab< int > | clust |
The cluster number, one for each face.
|
|
int | count |
The total number of clusters in the
MNMesh. |
DllExport MNFaceClusters | ( | MNMesh & | mesh, |
DWORD | clusterFlags | ||
) |
Creates clusters from distinct selected components.
This method will create face cluster lists based on the specified MNMesh. Each contiguous group of selected faces is grouped into a cluster.
DllExport MNFaceClusters | ( | MNMesh & | mesh, |
float | angle, | ||
DWORD | clusterFlags | ||
) |
This method will create face cluster lists based on the specified MNMesh.
Cluster boundaries will be determined by the angle between faces and optionally by the face flags.
int operator[] | ( | int | i | ) | [inline] |
This method will create a table indicating which face cluster each vertex in the mesh is in.
Computes average normals and centers for each of the face clusters.
This method will finds the edge list that borders this cluster.
This edge list is a set of closed loops of edges, which may be empty. For instance, if the mesh is a sphere, and all the faces are in the cluster, there are no border edges for the cluster. But if one horizontal row of faces, such as the faces just above the equator, are in the cluster, then the edges above those faces form one loop, while the edges below form another.
This method will retrieve the "outline" direction for the border of the cluster.
This is the direction used in the "Outline" feature in Editable Poly face level, as well as in the Bevel command mode.
The cluster number, one for each face.
Note that non-selected faces have UNDEFINED for their id.