Public Member Functions | Public Attributes

MEdge Class Reference

Search for all occurrences

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.

#include <meshadj.h>

Inheritance diagram for MEdge:
Inheritance graph
[legend]

List of all members.

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]

Member Function Documentation

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.
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.
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.
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.
DllExport Point3 Center ( Point3 verts )
Remarks:
Returns the center of this edge.
Parameters:
Point3 *verts

The list of vertices from the mesh.
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.
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.
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.
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.
{ return (v[0] == vv) ? v[1] : v[0]; }
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.
{ return (f[0] == ff) ? f[1] : f[0]; }

Member Data Documentation

DWORD f[2]
DWORD v[2]

MEdge MEdge MEdge MEdge MEdge MEdge MEdge MEdge MEdge MEdge
MEdge MEdge MEdge MEdge MEdge MEdge MEdge MEdge MEdge MEdge