3ds Max C++ API Reference
MEdge Class Reference

#include <meshadj.h>

+ Inheritance diagram for MEdge:

Public Member Functions

DllExport int EdgeIndex (Face *faces, int side)
 
DllExport BOOL Selected (Face *faces, BitArray &esel)
 
DllExport BOOL Visible (Face *faces)
 
DllExport BOOL Hidden (Face *faces)
 
DllExport Point3 Center (Point3 *verts)
 
DllExport BOOL AFaceSelected (BitArray &fsel)
 
DllExport Point3 ButterFlySubdivide (Mesh *mesh, AdjFaceList *af, float tens)
 
DllExport UVVert ButterFlyMapSubdivide (Mesh *mesh, AdjFaceList *af, float tens, int mp, bool &seam, UVVert &side2)
 
DWORD OtherVert (DWORD vv)
 
DWORD OtherFace (DWORD ff)
 

Public Attributes

DWORD f [2]
 
DWORD v [2]
 

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...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 

Detailed Description

See also
Class AdjEdgeList, Class Mesh.

Description:
This class describes a single edge of a mesh object that is adjacent to a vertex. This is an edge that is coming out of the vertex. This is used in adjacency lists.
Data Members:
DWORD f[2];

The indices into the meshes face table of the two faces that share this edge.

DWORD v[2];

The indices into the meshes vertex table of the two vertices of this edge.

Member Function Documentation

◆ EdgeIndex()

DllExport int EdgeIndex ( Face faces,
int  side 
)
Remarks
Returns the index of the edge in the face on side side. So: given a Mesh mesh and an MEdge *me, int eid = me->EdgeIndex (mesh.faces, 0); then mesh.faces[me->f[0]].v[eid] and mesh.faces[me->f[0]].v[(eid+1)%3] are the endpoints of the edge.

In particular, mesh.edgeSel[me->f[0]*3+eid] tells whether this edge is selected.
Parameters:
Face *faces

The list of faces from the mesh.

int side

Either 0 or 1, indicating whether we should find this result for the face on side 0 or on side 1.

◆ Selected()

DllExport BOOL Selected ( Face faces,
BitArray esel 
)
Remarks
Returns TRUE if this edge is selected on either side; or FALSE if it is not selected on either.
Parameters:
Face *faces

The list of faces from the mesh.

BitArray &esel

The edge selection BitArray from the mesh.

◆ Visible()

DllExport BOOL Visible ( Face faces)
Remarks
Returns TRUE if this edge is visible on either side; or FALSE if it is not visible on either.
Parameters:
Face *faces

The list of faces from the mesh.

◆ Hidden()

DllExport BOOL Hidden ( Face faces)
Remarks
Returns TRUE if all the faces using this edge are hidden; otherwise FALSE.
Parameters:
Face *faces

The list of faces from the mesh.

◆ Center()

DllExport Point3 Center ( Point3 verts)
Remarks
Returns the center of this edge.
Parameters:
Point3 *verts

The list of vertices from the mesh.

◆ AFaceSelected()

DllExport BOOL AFaceSelected ( BitArray fsel)
Remarks
Returns TRUE if one (or both) of the faces sharing the edge is selected; otherwise FALSE.
Parameters:
BitArray &fsel

The face selection bit array.

◆ ButterFlySubdivide()

DllExport Point3 ButterFlySubdivide ( Mesh mesh,
AdjFaceList af,
float  tens 
)
Remarks
Returns a point suitable for use in standard tessellation.
Parameters:
Mesh *mesh

A pointer to the associated mesh.

AdjFaceList *af

A pointer to the associated AdjFaceList.

float tens

The tension parameter, as seen in the Tessellate modifier.

◆ ButterFlyMapSubdivide()

DllExport UVVert ButterFlyMapSubdivide ( Mesh mesh,
AdjFaceList af,
float  tens,
int  mp,
bool &  seam,
UVVert side2 
)
Remarks
This method creates a map vertex for the middle of this edge using the Butterfly tessellation scheme. Designed to create map vertices to go with the vertex created by ButterFlySubdivide().
Parameters:
Mesh *mesh

A pointer to the associated mesh.

AdjFaceList *af

A pointer to the associated AdjFaceList.

float tens

The tension parameter, as seen in the Tessellate modifier.

int mp

The map channel we want to get a result for.

bool & seam

If this is set to true by the algorithm, then there's a mapping seam on this edge, and different map vertices should be used on each side.

UVVert & side2

If there's a seam, this contains the mapping result for the second side. The return value matches the mapping scheme on face f[0]; side2 matches the scheme on face f[1].
Returns
The desired mapping coordinates.

◆ OtherVert()

DWORD OtherVert ( DWORD  vv)
inline
Remarks
Returns the index of the other vertex using this edge.
Parameters:
DWORD vv

The index of a vertex using the edge.
129 { return (v[0] == vv) ? v[1] : v[0]; }
DWORD v[2]
Definition: meshadj.h:49

◆ OtherFace()

DWORD OtherFace ( DWORD  ff)
inline
Remarks
Returns the index of the other face using this edge.
Parameters:
DWORD ff

The index of a face using this edge.
134 { return (f[0] == ff) ? f[1] : f[0]; }
DWORD f[2]
Definition: meshadj.h:48

Member Data Documentation

◆ f

DWORD f[2]

◆ v

DWORD v[2]