3ds Max C++ API Reference
MNMesh Flags

The following flags can be set on a MNMesh. More...

Macros

#define MN_MESH_NONTRI   (1<<0)
 At least 2 triangles have been joined. More...
 
#define MN_MESH_FILLED_IN   (1<<1)
 If set, all topological links, such as the list of edges, are complete. More...
 
#define MN_MESH_RATSNEST   (1<<2)
 Some regular Meshes have more than two faces referencing the same edge, or more than one referencing it in the same direction. More...
 
#define MN_MESH_NO_BAD_VERTS   (1<<3)
 This indicates that the mesh has had its vertices checked and "bad" ones eliminated by EliminateBadVerts. More...
 
#define MN_MESH_VERTS_ORDERED   (1<<4)
 Set if face and edge tables in each vertex are ordered by the methods MNMesh::OrderVerts(). More...
 
#define MN_MESH_FACE_NORMALS_INVALID   (1<<6)
 Set if any of the face normals (fnorm) have become invalid. More...
 
#define MN_MESH_HAS_VOLUME   (1<<7)
 This mesh has at least one connected component which contains volume, i.e. More...
 
#define MN_MESH_HITTEST_REQUIRE_ALL   (1<<8)
 
#define MN_MESH_DIASBLE_NULL_EDGE_CHECK   (1<<9)
 When set, disables the "null" edge check and remediation in EliminateNullEdges. More...
 
#define MN_MESH_PARTIALCACHEINVALID   (1<<16)
 Indicates that the MNMesh has only set some of the vertices as invalid and not to reprocess the entire mesh just the vertices that changed. More...
 
#define MN_MESH_CACHE_FLAGS   (MN_MESH_FILLED_IN|MN_MESH_NO_BAD_VERTS|MN_MESH_VERTS_ORDERED)
 

Detailed Description

The following flags can be set on a MNMesh.

Macro Definition Documentation

◆ MN_MESH_NONTRI

#define MN_MESH_NONTRI   (1<<0)

At least 2 triangles have been joined.

In other words at least one face has more than three sides.

◆ MN_MESH_FILLED_IN

#define MN_MESH_FILLED_IN   (1<<1)

If set, all topological links, such as the list of edges, are complete.

◆ MN_MESH_RATSNEST

#define MN_MESH_RATSNEST   (1<<2)

Some regular Meshes have more than two faces referencing the same edge, or more than one referencing it in the same direction.

These are termed "rats' nest meshes". Since our edge structure only permits 1 or 2 faces (one in each direction), these meshes are unacceptable. Upon conversion, certain vertices & edges are replicated (increasing the vertex count) to separate these into regular, non-rats'-nest parts. If this happens, this flag is set to let you know this change has occurred. In particular, converting this MNMesh back into a regular Mesh will produce a Mesh with more vertices than you started with.

◆ MN_MESH_NO_BAD_VERTS

#define MN_MESH_NO_BAD_VERTS   (1<<3)

This indicates that the mesh has had its vertices checked and "bad" ones eliminated by EliminateBadVerts.

In other words it is established that each vertexe has exactly one connected component of faces and edges.

◆ MN_MESH_VERTS_ORDERED

#define MN_MESH_VERTS_ORDERED   (1<<4)

Set if face and edge tables in each vertex are ordered by the methods MNMesh::OrderVerts().

◆ MN_MESH_FACE_NORMALS_INVALID

#define MN_MESH_FACE_NORMALS_INVALID   (1<<6)

Set if any of the face normals (fnorm) have become invalid.

◆ MN_MESH_HAS_VOLUME

#define MN_MESH_HAS_VOLUME   (1<<7)

This mesh has at least one connected component which contains volume, i.e.

represents a solid object with no gaps or holes. The flag is set by the MNMesh::FindOpenRegions() method.

◆ MN_MESH_HITTEST_REQUIRE_ALL

#define MN_MESH_HITTEST_REQUIRE_ALL   (1<<8)

Forces faces to be hit only if all triangles are hit.

◆ MN_MESH_DIASBLE_NULL_EDGE_CHECK

#define MN_MESH_DIASBLE_NULL_EDGE_CHECK   (1<<9)

When set, disables the "null" edge check and remediation in EliminateNullEdges.

Presently used for old versions of PolyOperations to avoid corrupting models generated before the null edge check was implemented.

◆ MN_MESH_PARTIALCACHEINVALID

#define MN_MESH_PARTIALCACHEINVALID   (1<<16)

Indicates that the MNMesh has only set some of the vertices as invalid and not to reprocess the entire mesh just the vertices that changed.

◆ MN_MESH_CACHE_FLAGS

#define MN_MESH_CACHE_FLAGS   (MN_MESH_FILLED_IN|MN_MESH_NO_BAD_VERTS|MN_MESH_VERTS_ORDERED)