3ds Max C++ API Reference
Loading...
Searching...
No Matches
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.
 
#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
 

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

◆ MDELTA_VMOVE

#define MDELTA_VMOVE   0x0001

◆ MDELTA_VCLONE

#define MDELTA_VCLONE   0x0004

◆ MDELTA_VCREATE

#define MDELTA_VCREATE   MDELTA_VCLONE

◆ MDELTA_VDELETE

#define MDELTA_VDELETE   0x0008

◆ MDELTA_VDATA

#define MDELTA_VDATA   0x0010

◆ MDELTA_FREMAP

#define MDELTA_FREMAP   0x0020

◆ MDELTA_FCHANGE

#define MDELTA_FCHANGE   0x0040

◆ MDELTA_FCREATE

#define MDELTA_FCREATE   0x0080

◆ MDELTA_FDELETE

#define MDELTA_FDELETE   0x0100

◆ MDELTA_FDATA

#define MDELTA_FDATA   0x0200

◆ MDELTA_NUMBERS

#define MDELTA_NUMBERS   0x0400

◆ MDELTA_FSMOOTH

#define MDELTA_FSMOOTH   0x0800

◆ MDELTA_ALL

#define MDELTA_ALL   0xffff

◆ FR_V0

#define FR_V0   1

Remap the 0th vertex.

◆ FR_V1

#define FR_V1   2

Remap the 1st vertex.

◆ FR_V2

#define FR_V2   4

Remap the 2nd vertex.

◆ FR_ALL

#define FR_ALL   7

Remap all the vertices.

◆ ATTRIB_EDGE_A

#define ATTRIB_EDGE_A   (1<<0)

Alter edge between v0 and v1.

◆ ATTRIB_EDGE_B

#define ATTRIB_EDGE_B   (1<<1)

Alter edge between v1 and v2.

◆ ATTRIB_EDGE_C

#define ATTRIB_EDGE_C   (1<<2)

Alter edge between v2 and v0.

◆ ATTRIB_EDGE_ALL

#define ATTRIB_EDGE_ALL   7

Alter all the edges.

◆ ATTRIB_HIDE_FACE

#define ATTRIB_HIDE_FACE   (1<<3)

Alter the face hidden state.

◆ ATTRIB_MATID

#define ATTRIB_MATID   (1<<4)

Alter the material ID.

◆ ATTRIB_MATID_SHIFT

#define ATTRIB_MATID_SHIFT   5

◆ ATTRIB_MATID_MASK

#define ATTRIB_MATID_MASK   0xffff

◆ EM_MESHUIPARAM_LAST_INT

#define EM_MESHUIPARAM_LAST_INT   MuiShowFNormals

◆ EM_SL_OBJECT

#define EM_SL_OBJECT   0

◆ EM_SL_VERTEX

#define EM_SL_VERTEX   1

◆ EM_SL_EDGE

#define EM_SL_EDGE   2

◆ EM_SL_FACE

#define EM_SL_FACE   3

◆ EM_SL_POLYGON

#define EM_SL_POLYGON   4

◆ EM_SL_ELEMENT

#define EM_SL_ELEMENT   5

◆ EM_SHORTCUT_ID

#define EM_SHORTCUT_ID   0x38ba1366

◆ MDUID_EM_SELTYPE

#define MDUID_EM_SELTYPE   40001

◆ MDUID_EM_SELTYPE_BACK

#define MDUID_EM_SELTYPE_BACK   40002

◆ MDUID_EM_SELTYPE_VERTEX

#define MDUID_EM_SELTYPE_VERTEX   40003

◆ MDUID_EM_SELTYPE_EDGE

#define MDUID_EM_SELTYPE_EDGE   40004

◆ MDUID_EM_SELTYPE_FACE

#define MDUID_EM_SELTYPE_FACE   40005

◆ MDUID_EM_SELTYPE_POLYGON

#define MDUID_EM_SELTYPE_POLYGON   40006

◆ MDUID_EM_SELTYPE_ELEMENT

#define MDUID_EM_SELTYPE_ELEMENT   40007

◆ MDUID_EM_SELTYPE_OBJ

#define MDUID_EM_SELTYPE_OBJ   40008

◆ MDUID_EM_AUTOSMOOTH

#define MDUID_EM_AUTOSMOOTH   40009

◆ MDUID_EM_ATTACH

#define MDUID_EM_ATTACH   40010

◆ MDUID_EM_BREAK

#define MDUID_EM_BREAK   40011

◆ MDUID_EM_IGBACK

#define MDUID_EM_IGBACK   40012

◆ MDUID_EM_BEVEL

#define MDUID_EM_BEVEL   40013

◆ MDUID_EM_CREATE

#define MDUID_EM_CREATE   40014

◆ MDUID_EM_CUT

#define MDUID_EM_CUT   40015

◆ MDUID_EM_DIVIDE

#define MDUID_EM_DIVIDE   40016

◆ MDUID_EM_EXTRUDE

#define MDUID_EM_EXTRUDE   40017

◆ MDUID_EM_FLIPNORM

#define MDUID_EM_FLIPNORM   40018

◆ MDUID_EM_SS_BACKFACE

#define MDUID_EM_SS_BACKFACE   40019

◆ MDUID_EM_UNIFY_NORMALS

#define MDUID_EM_UNIFY_NORMALS   40020

◆ MDUID_EM_HIDE

#define MDUID_EM_HIDE   40021

◆ MDUID_EM_EDGE_INVIS

#define MDUID_EM_EDGE_INVIS   40022

◆ MDUID_EM_IGNORE_INVIS [1/2]

#define MDUID_EM_IGNORE_INVIS   40023

◆ MDUID_EM_IGNORE_INVIS [2/2]

#define MDUID_EM_IGNORE_INVIS   40023

◆ MDUID_EM_COLLAPSE

#define MDUID_EM_COLLAPSE   40024

◆ MDUID_EM_SHOWNORMAL

#define MDUID_EM_SHOWNORMAL   40025

◆ MDUID_EM_SELOPEN

#define MDUID_EM_SELOPEN   40026

◆ MDUID_EM_REMOVE_ISO

#define MDUID_EM_REMOVE_ISO   40027

◆ MDUID_EM_SLICEPLANE

#define MDUID_EM_SLICEPLANE   40028

◆ MDUID_EM_SOFTSEL

#define MDUID_EM_SOFTSEL   40029

◆ MDUID_EM_SLICE

#define MDUID_EM_SLICE   40030

◆ MDUID_EM_DETACH

#define MDUID_EM_DETACH   40031

◆ MDUID_EM_TURNEDGE

#define MDUID_EM_TURNEDGE   40032

◆ MDUID_EM_UNHIDE

#define MDUID_EM_UNHIDE   40033

◆ MDUID_EM_EDGE_VIS

#define MDUID_EM_EDGE_VIS   40034

◆ MDUID_EM_SELBYVERT

#define MDUID_EM_SELBYVERT   40035

◆ MDUID_EM_AUTOEDGE

#define MDUID_EM_AUTOEDGE   40036

◆ MDUID_EM_WELD

#define MDUID_EM_WELD   40038

◆ MDUID_EM_EXPLODE

#define MDUID_EM_EXPLODE   40039

◆ MDUID_EM_CHAMFER

#define MDUID_EM_CHAMFER   40040

◆ MDUID_EM_WELD_TARGET

#define MDUID_EM_WELD_TARGET   40041

◆ MDUID_EM_ATTACH_LIST

#define MDUID_EM_ATTACH_LIST   40042

◆ MDUID_EM_VIEW_ALIGN

#define MDUID_EM_VIEW_ALIGN   40043

◆ MDUID_EM_GRID_ALIGN

#define MDUID_EM_GRID_ALIGN   40044

◆ MDUID_EM_SPLIT

#define MDUID_EM_SPLIT   40045

◆ MDUID_EM_REFINE_CUTENDS

#define MDUID_EM_REFINE_CUTENDS   40046

◆ MDUID_EM_COPY_NAMEDSEL

#define MDUID_EM_COPY_NAMEDSEL   40047

◆ MDUID_EM_PASTE_NAMEDSEL

#define MDUID_EM_PASTE_NAMEDSEL   40048

◆ MDUID_EM_MAKE_PLANAR

#define MDUID_EM_MAKE_PLANAR   40049

◆ MDUID_EM_VERT_COLOR

#define MDUID_EM_VERT_COLOR   40050

◆ MDUID_EM_VERT_ILLUM

#define MDUID_EM_VERT_ILLUM   40051

◆ MDUID_EM_FLIP_NORMAL_MODE

#define MDUID_EM_FLIP_NORMAL_MODE   40052

Enumeration Type Documentation

◆ meshCommandMode

Enumerator
McmCreate 
McmAttach 
McmExtrude 
McmBevel 
McmChamfer 
McmSlicePlane 
McmCut 
McmWeldTarget 
McmFlipNormalMode 
McmDivide 
McmTurnEdge 
McmEditSoftSelection 
@ McmEditSoftSelection
Definition: meshdelta.h:2309
@ McmFlipNormalMode
Definition: meshdelta.h:2309
@ McmBevel
Definition: meshdelta.h:2308
@ McmCreate
Definition: meshdelta.h:2308
@ McmCut
Definition: meshdelta.h:2309
@ McmSlicePlane
Definition: meshdelta.h:2309
@ McmChamfer
Definition: meshdelta.h:2308
@ McmExtrude
Definition: meshdelta.h:2308
@ McmTurnEdge
Definition: meshdelta.h:2309
@ McmWeldTarget
Definition: meshdelta.h:2309
@ McmDivide
Definition: meshdelta.h:2309
@ McmAttach
Definition: meshdelta.h:2308

◆ meshButtonOp

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 
@ MopCopyNS
Definition: meshdelta.h:2315
@ MopGridAlign
Definition: meshdelta.h:2311
@ MopEditVertIllum
Definition: meshdelta.h:2315
@ MopDelete
Definition: meshdelta.h:2310
@ MopPasteNS
Definition: meshdelta.h:2315
@ MopHide
Definition: meshdelta.h:2310
@ MopUnifyNormal
Definition: meshdelta.h:2313
@ MopSlice
Definition: meshdelta.h:2311
@ MopEditVertColor
Definition: meshdelta.h:2315
@ MopSelectOpenEdges
Definition: meshdelta.h:2312
@ MopCollapse
Definition: meshdelta.h:2311
@ MopClearAllSG
Definition: meshdelta.h:2314
@ MopSelectByColor
Definition: meshdelta.h:2314
@ MopSelectBySG
Definition: meshdelta.h:2314
@ MopExplode
Definition: meshdelta.h:2311
@ MopAutoSmooth
Definition: meshdelta.h:2313
@ MopAutoEdge
Definition: meshdelta.h:2313
@ MopSelectByID
Definition: meshdelta.h:2314
@ MopRemoveIsolatedVerts
Definition: meshdelta.h:2312
@ MopViewAlign
Definition: meshdelta.h:2310
@ MopMakePlanar
Definition: meshdelta.h:2311
@ MopWeld
Definition: meshdelta.h:2311
@ MopVisibleEdge
Definition: meshdelta.h:2313
@ MopAttachList
Definition: meshdelta.h:2314
@ MopTessellate
Definition: meshdelta.h:2311
@ MopUnhideAll
Definition: meshdelta.h:2310
@ MopBreak
Definition: meshdelta.h:2310
@ MopDetach
Definition: meshdelta.h:2310
@ MopCreateShapeFromEdges
Definition: meshdelta.h:2312
@ MopFlipNormal
Definition: meshdelta.h:2313
@ MopInvisibleEdge
Definition: meshdelta.h:2313
@ MopShowNormal
Definition: meshdelta.h:2312

◆ meshUIParam

Enumerator
MuiSelByVert 
MuiIgBack 
MuiIgnoreVis 
MuiSoftSel 
MuiSSUseEDist 
MuiSSEDist 
MuiSSBack 
MuiWeldBoxSize 
MuiExtrudeType 
MuiShowVNormals 
MuiShowFNormals 
MuiSliceSplit 
MuiCutRefine 
MuiPolyThresh 
MuiFalloff 
MuiPinch 
MuiBubble 
MuiWeldDist 
MuiNormalSize 
MuiDeleteIsolatedVerts 
2318 MuiShowFNormals, MuiSliceSplit, MuiCutRefine, // end of integer values
2320 MuiDeleteIsolatedVerts // MuiDeleteIsolatedVerts is an integer value, but also supports float
2321 };
@ MuiSelByVert
Definition: meshdelta.h:2316
@ MuiIgBack
Definition: meshdelta.h:2316
@ MuiIgnoreVis
Definition: meshdelta.h:2316
@ MuiWeldDist
Definition: meshdelta.h:2319
@ MuiSSBack
Definition: meshdelta.h:2317
@ MuiPolyThresh
Definition: meshdelta.h:2319
@ MuiFalloff
Definition: meshdelta.h:2319
@ MuiDeleteIsolatedVerts
Definition: meshdelta.h:2320
@ MuiBubble
Definition: meshdelta.h:2319
@ MuiWeldBoxSize
Definition: meshdelta.h:2317
@ MuiSliceSplit
Definition: meshdelta.h:2318
@ MuiShowFNormals
Definition: meshdelta.h:2318
@ MuiCutRefine
Definition: meshdelta.h:2318
@ MuiNormalSize
Definition: meshdelta.h:2319
@ MuiExtrudeType
Definition: meshdelta.h:2317
@ MuiSSEDist
Definition: meshdelta.h:2317
@ MuiPinch
Definition: meshdelta.h:2319
@ MuiSSUseEDist
Definition: meshdelta.h:2316
@ MuiShowVNormals
Definition: meshdelta.h:2317
@ MuiSoftSel
Definition: meshdelta.h:2316

Function Documentation

◆ FindTriangulation()

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]];