meshdelta.h File Reference

meshdelta.h File Reference
#include "maxheap.h"
#include "export.h"
#include "meshadj.h"

Classes

class  VertMove
 This class represents the notion of a mesh edit vertex move. More...
 
class  UVVertSet
 This class represents the notion of a mesh edit UVW vertex assignment. More...
 
class  FaceCreate
 This class represents the notion of a face create within a MeshDelta. More...
 
class  FaceRemap
 This class represents the notion of a mesh edit Face Remap, which changes one or more of the vertices a face uses. More...
 
class  FaceChange
 This class represents the notion of a mesh edit Face Change, which changes the visibility of the face's edges, its hidden state and/or its material ID. More...
 
class  FaceSmooth
 This class represents the notion of the edit mesh Face Smooth operation. More...
 
class  MapDelta
 Represents some kind of change to a mesh map. More...
 
class  VDataDelta
 
class  MeshDelta
 
class  MeshDeltaUser
 
class  MeshDeltaUserData
 

Macros

#define MDELTA_VMOVE   0x0001
 
#define MDELTA_VCLONE   0x0004
 
#define MDELTA_VCREATE   MDELTA_VCLONE
 
#define MDELTA_VDELETE   0x0008
 
#define MDELTA_VDATA   0x0010
 
#define MDELTA_FREMAP   0x0020
 
#define MDELTA_FCHANGE   0x0040
 
#define MDELTA_FCREATE   0x0080
 
#define MDELTA_FDELETE   0x0100
 
#define MDELTA_FDATA   0x0200
 
#define MDELTA_NUMBERS   0x0400
 
#define MDELTA_FSMOOTH   0x0800
 
#define MDELTA_ALL   0xffff
 
#define FR_V0   1
 Remap the 0th vertex. More...
 
#define FR_V1   2
 Remap the 1st vertex. More...
 
#define FR_V2   4
 Remap the 2nd vertex. More...
 
#define FR_ALL   7
 Remap all the vertices. More...
 
#define ATTRIB_EDGE_A   (1<<0)
 Alter edge between v0 and v1. More...
 
#define ATTRIB_EDGE_B   (1<<1)
 Alter edge between v1 and v2. More...
 
#define ATTRIB_EDGE_C   (1<<2)
 Alter edge between v2 and v0. More...
 
#define ATTRIB_EDGE_ALL   7
 Alter all the edges. More...
 
#define ATTRIB_HIDE_FACE   (1<<3)
 Alter the face hidden state. More...
 
#define ATTRIB_MATID   (1<<4)
 Alter the material ID. More...
 
#define ATTRIB_MATID_SHIFT   5
 
#define ATTRIB_MATID_MASK   0xffff
 
#define EM_MESHUIPARAM_LAST_INT   MuiShowFNormals
 
#define EM_SL_OBJECT   0
 
#define EM_SL_VERTEX   1
 
#define EM_SL_EDGE   2
 
#define EM_SL_FACE   3
 
#define EM_SL_POLYGON   4
 
#define EM_SL_ELEMENT   5
 
#define EM_SHORTCUT_ID   0x38ba1366
 
#define MDUID_EM_SELTYPE   40001
 
#define MDUID_EM_SELTYPE_BACK   40002
 
#define MDUID_EM_SELTYPE_VERTEX   40003
 
#define MDUID_EM_SELTYPE_EDGE   40004
 
#define MDUID_EM_SELTYPE_FACE   40005
 
#define MDUID_EM_SELTYPE_POLYGON   40006
 
#define MDUID_EM_SELTYPE_ELEMENT   40007
 
#define MDUID_EM_SELTYPE_OBJ   40008
 
#define MDUID_EM_AUTOSMOOTH   40009
 
#define MDUID_EM_ATTACH   40010
 
#define MDUID_EM_BREAK   40011
 
#define MDUID_EM_IGBACK   40012
 
#define MDUID_EM_BEVEL   40013
 
#define MDUID_EM_CREATE   40014
 
#define MDUID_EM_CUT   40015
 
#define MDUID_EM_DIVIDE   40016
 
#define MDUID_EM_EXTRUDE   40017
 
#define MDUID_EM_FLIPNORM   40018
 
#define MDUID_EM_SS_BACKFACE   40019
 
#define MDUID_EM_UNIFY_NORMALS   40020
 
#define MDUID_EM_HIDE   40021
 
#define MDUID_EM_EDGE_INVIS   40022
 
#define MDUID_EM_IGNORE_INVIS   40023
 
#define MDUID_EM_IGNORE_INVIS   40023
 
#define MDUID_EM_COLLAPSE   40024
 
#define MDUID_EM_SHOWNORMAL   40025
 
#define MDUID_EM_SELOPEN   40026
 
#define MDUID_EM_REMOVE_ISO   40027
 
#define MDUID_EM_SLICEPLANE   40028
 
#define MDUID_EM_SOFTSEL   40029
 
#define MDUID_EM_SLICE   40030
 
#define MDUID_EM_DETACH   40031
 
#define MDUID_EM_TURNEDGE   40032
 
#define MDUID_EM_UNHIDE   40033
 
#define MDUID_EM_EDGE_VIS   40034
 
#define MDUID_EM_SELBYVERT   40035
 
#define MDUID_EM_AUTOEDGE   40036
 
#define MDUID_EM_WELD   40038
 
#define MDUID_EM_EXPLODE   40039
 
#define MDUID_EM_CHAMFER   40040
 
#define MDUID_EM_WELD_TARGET   40041
 
#define MDUID_EM_ATTACH_LIST   40042
 
#define MDUID_EM_VIEW_ALIGN   40043
 
#define MDUID_EM_GRID_ALIGN   40044
 
#define MDUID_EM_SPLIT   40045
 
#define MDUID_EM_REFINE_CUTENDS   40046
 
#define MDUID_EM_COPY_NAMEDSEL   40047
 
#define MDUID_EM_PASTE_NAMEDSEL   40048
 
#define MDUID_EM_MAKE_PLANAR   40049
 
#define MDUID_EM_VERT_COLOR   40050
 
#define MDUID_EM_VERT_ILLUM   40051
 
#define MDUID_EM_FLIP_NORMAL_MODE   40052
 

Enumerations

enum  meshCommandMode {
  McmCreate, McmAttach, McmExtrude, McmBevel,
  McmChamfer, McmSlicePlane, McmCut, McmWeldTarget,
  McmFlipNormalMode, McmDivide, McmTurnEdge, McmEditSoftSelection
}
 
enum  meshButtonOp {
  MopHide, MopUnhideAll, MopDelete, MopDetach,
  MopBreak, MopViewAlign, MopGridAlign, MopMakePlanar,
  MopCollapse, MopTessellate, MopExplode, MopSlice,
  MopWeld, MopRemoveIsolatedVerts, MopSelectOpenEdges, MopCreateShapeFromEdges,
  MopShowNormal, MopFlipNormal, MopUnifyNormal, MopAutoSmooth,
  MopVisibleEdge, MopInvisibleEdge, MopAutoEdge, MopAttachList,
  MopSelectByID, MopSelectBySG, MopClearAllSG, MopSelectByColor,
  MopCopyNS, MopPasteNS, MopEditVertColor, MopEditVertIllum
}
 
enum  meshUIParam {
  MuiSelByVert, MuiIgBack, MuiIgnoreVis, MuiSoftSel,
  MuiSSUseEDist, MuiSSEDist, MuiSSBack, MuiWeldBoxSize,
  MuiExtrudeType, MuiShowVNormals, MuiShowFNormals, MuiSliceSplit,
  MuiCutRefine, MuiPolyThresh, MuiFalloff, MuiPinch,
  MuiBubble, MuiWeldDist, MuiNormalSize, MuiDeleteIsolatedVerts
}
 

Functions

DllExport void FindTriangulation (Mesh &m, int deg, int *vv, int *tri)
 

Macro Definition Documentation

#define MDELTA_VMOVE   0x0001
#define MDELTA_VCLONE   0x0004
#define MDELTA_VCREATE   MDELTA_VCLONE
#define MDELTA_VDELETE   0x0008
#define MDELTA_VDATA   0x0010
#define MDELTA_FREMAP   0x0020
#define MDELTA_FCHANGE   0x0040
#define MDELTA_FCREATE   0x0080
#define MDELTA_FDELETE   0x0100
#define MDELTA_FDATA   0x0200
#define MDELTA_NUMBERS   0x0400
#define MDELTA_FSMOOTH   0x0800
#define MDELTA_ALL   0xffff
#define FR_V0   1

Remap the 0th vertex.

#define FR_V1   2

Remap the 1st vertex.

#define FR_V2   4

Remap the 2nd vertex.

#define FR_ALL   7

Remap all the vertices.

#define ATTRIB_EDGE_A   (1<<0)

Alter edge between v0 and v1.

#define ATTRIB_EDGE_B   (1<<1)

Alter edge between v1 and v2.

#define ATTRIB_EDGE_C   (1<<2)

Alter edge between v2 and v0.

#define ATTRIB_EDGE_ALL   7

Alter all the edges.

#define ATTRIB_HIDE_FACE   (1<<3)

Alter the face hidden state.

#define ATTRIB_MATID   (1<<4)

Alter the material ID.

#define ATTRIB_MATID_SHIFT   5
#define ATTRIB_MATID_MASK   0xffff
#define EM_MESHUIPARAM_LAST_INT   MuiShowFNormals
#define EM_SL_OBJECT   0
#define EM_SL_VERTEX   1
#define EM_SL_EDGE   2
#define EM_SL_FACE   3
#define EM_SL_POLYGON   4
#define EM_SL_ELEMENT   5
#define EM_SHORTCUT_ID   0x38ba1366
#define MDUID_EM_SELTYPE   40001
#define MDUID_EM_SELTYPE_BACK   40002
#define MDUID_EM_SELTYPE_VERTEX   40003
#define MDUID_EM_SELTYPE_EDGE   40004
#define MDUID_EM_SELTYPE_FACE   40005
#define MDUID_EM_SELTYPE_POLYGON   40006
#define MDUID_EM_SELTYPE_ELEMENT   40007
#define MDUID_EM_SELTYPE_OBJ   40008
#define MDUID_EM_AUTOSMOOTH   40009
#define MDUID_EM_ATTACH   40010
#define MDUID_EM_BREAK   40011
#define MDUID_EM_IGBACK   40012
#define MDUID_EM_BEVEL   40013
#define MDUID_EM_CREATE   40014
#define MDUID_EM_CUT   40015
#define MDUID_EM_DIVIDE   40016
#define MDUID_EM_EXTRUDE   40017
#define MDUID_EM_FLIPNORM   40018
#define MDUID_EM_SS_BACKFACE   40019
#define MDUID_EM_UNIFY_NORMALS   40020
#define MDUID_EM_HIDE   40021
#define MDUID_EM_EDGE_INVIS   40022
#define MDUID_EM_IGNORE_INVIS   40023
#define MDUID_EM_IGNORE_INVIS   40023
#define MDUID_EM_COLLAPSE   40024
#define MDUID_EM_SHOWNORMAL   40025
#define MDUID_EM_SELOPEN   40026
#define MDUID_EM_REMOVE_ISO   40027
#define MDUID_EM_SLICEPLANE   40028
#define MDUID_EM_SOFTSEL   40029
#define MDUID_EM_SLICE   40030
#define MDUID_EM_DETACH   40031
#define MDUID_EM_TURNEDGE   40032
#define MDUID_EM_UNHIDE   40033
#define MDUID_EM_EDGE_VIS   40034
#define MDUID_EM_SELBYVERT   40035
#define MDUID_EM_AUTOEDGE   40036
#define MDUID_EM_WELD   40038
#define MDUID_EM_EXPLODE   40039
#define MDUID_EM_CHAMFER   40040
#define MDUID_EM_WELD_TARGET   40041
#define MDUID_EM_ATTACH_LIST   40042
#define MDUID_EM_VIEW_ALIGN   40043
#define MDUID_EM_GRID_ALIGN   40044
#define MDUID_EM_SPLIT   40045
#define MDUID_EM_REFINE_CUTENDS   40046
#define MDUID_EM_COPY_NAMEDSEL   40047
#define MDUID_EM_PASTE_NAMEDSEL   40048
#define MDUID_EM_MAKE_PLANAR   40049
#define MDUID_EM_VERT_COLOR   40050
#define MDUID_EM_VERT_ILLUM   40051
#define MDUID_EM_FLIP_NORMAL_MODE   40052

Enumeration Type Documentation

Enumerator
McmCreate 
McmAttach 
McmExtrude 
McmBevel 
McmChamfer 
McmSlicePlane 
McmCut 
McmWeldTarget 
McmFlipNormalMode 
McmDivide 
McmTurnEdge 
McmEditSoftSelection 
Definition: meshdelta.h:2298
Definition: meshdelta.h:2299
Definition: meshdelta.h:2299
Definition: meshdelta.h:2299
Definition: meshdelta.h:2298
Definition: meshdelta.h:2298
Definition: meshdelta.h:2299
Definition: meshdelta.h:2298
Definition: meshdelta.h:2299
Definition: meshdelta.h:2298
Definition: meshdelta.h:2299
Definition: meshdelta.h:2299
Enumerator
MopHide 
MopUnhideAll 
MopDelete 
MopDetach 
MopBreak 
MopViewAlign 
MopGridAlign 
MopMakePlanar 
MopCollapse 
MopTessellate 
MopExplode 
MopSlice 
MopWeld 
MopRemoveIsolatedVerts 
MopSelectOpenEdges 
MopCreateShapeFromEdges 
MopShowNormal 
MopFlipNormal 
MopUnifyNormal 
MopAutoSmooth 
MopVisibleEdge 
MopInvisibleEdge 
MopAutoEdge 
MopAttachList 
MopSelectByID 
MopSelectBySG 
MopClearAllSG 
MopSelectByColor 
MopCopyNS 
MopPasteNS 
MopEditVertColor 
MopEditVertIllum 
Definition: meshdelta.h:2303
Definition: meshdelta.h:2304
Definition: meshdelta.h:2304
Definition: meshdelta.h:2302
Definition: meshdelta.h:2301
Definition: meshdelta.h:2300
Definition: meshdelta.h:2302
Definition: meshdelta.h:2303
Definition: meshdelta.h:2301
Definition: meshdelta.h:2305
Definition: meshdelta.h:2301
Definition: meshdelta.h:2302
Definition: meshdelta.h:2303
Definition: meshdelta.h:2303
Definition: meshdelta.h:2305
Definition: meshdelta.h:2304
Definition: meshdelta.h:2300
Definition: meshdelta.h:2303
Definition: meshdelta.h:2304
Definition: meshdelta.h:2300
Definition: meshdelta.h:2301
Definition: meshdelta.h:2303
Definition: meshdelta.h:2300
Definition: meshdelta.h:2301
Definition: meshdelta.h:2305
Definition: meshdelta.h:2300
Definition: meshdelta.h:2305
Definition: meshdelta.h:2302
Definition: meshdelta.h:2300
Definition: meshdelta.h:2304
Definition: meshdelta.h:2301
Definition: meshdelta.h:2301
Enumerator
MuiSelByVert 
MuiIgBack 
MuiIgnoreVis 
MuiSoftSel 
MuiSSUseEDist 
MuiSSEDist 
MuiSSBack 
MuiWeldBoxSize 
MuiExtrudeType 
MuiShowVNormals 
MuiShowFNormals 
MuiSliceSplit 
MuiCutRefine 
MuiPolyThresh 
MuiFalloff 
MuiPinch 
MuiBubble 
MuiWeldDist 
MuiNormalSize 
MuiDeleteIsolatedVerts 
2308  MuiShowFNormals, MuiSliceSplit, MuiCutRefine, // end of integer values
2310  MuiDeleteIsolatedVerts // MuiDeleteIsolatedVerts is an integer value, but also supports float
2311  };
Definition: meshdelta.h:2307
Definition: meshdelta.h:2309
Definition: meshdelta.h:2307
Definition: meshdelta.h:2310
Definition: meshdelta.h:2307
Definition: meshdelta.h:2309
Definition: meshdelta.h:2306
Definition: meshdelta.h:2306
Definition: meshdelta.h:2307
Definition: meshdelta.h:2307
Definition: meshdelta.h:2309
Definition: meshdelta.h:2308
Definition: meshdelta.h:2308
Definition: meshdelta.h:2306
Definition: meshdelta.h:2309
Definition: meshdelta.h:2309
Definition: meshdelta.h:2306
Definition: meshdelta.h:2309
Definition: meshdelta.h:2308
Definition: meshdelta.h:2306

Function Documentation

DllExport void FindTriangulation ( Mesh m,
int  deg,
int vv,
int tri 
)
Remarks
This global function is available in release 3.0 and later only. Finds a triangulation of an n-sided polygon using vertices in the specified mesh. As long as the vertices are coplanar, this algorithm will find a proper triangulation, even for nonconvex polygons.
Parameters:
Mesh &m The mesh containing the vertices used in the polygon. int deg The size of the polygon. int *vv The vertex indices of the polygon, in order around the perimeter. For instance, if deg is 5 and w points to an array containing (3, 6, 8, 0, 7), the polygon is presumed to have the outline described by m.verts[3], m.verts[6], m.verts[8], m.verts[0], and m.verts[7]. int *tri This is where the output is placed. Note that this should point to an array of size at least (deg-2)*3, to hold all the triangles. The values placed in this array are indices into the w array – that is, given a 5-sided polygon, one triangle in this list might be (0,2,3), indicating you should use the 0th, 2nd, and 3rd elements of w to form the triangle. Put another way, to make a face from the n'th triangle given by this array, you would set: f.v[0] = w[tri[n*3+0]]; f.v[1] = w[tri[n*3+1]]; f.v[2] = w[tri[n*3+2]];