Method Groups for Class MeshDelta

The methods in this class are grouped below.

(Links go to the MeshDelta Class Reference page.)

Initialization and Cleanup
MeshDelta::MeshDelta()
MeshDelta::MeshDelta(const Mesh &m)
MeshDelta::~MeshDelta()
MeshDelta::InitToMesh(const Mesh &m)
MeshDelta::ClearAllOps()
MeshDelta::SetInFNum(int nface)
MeshDelta::SetInVNum(int nv)
MeshDelta::SetMapNum(int num, bool keep=TRUE)
MeshDelta::GetMapNum()
MeshDelta::Map(int mp)
MeshDelta::getMapSupport (int mp)
MeshDelta::setMapSupport (int mp, bool val=true)
MeshDelta::hasMapSupport ()
MeshDelta::SetVDataNum(int num, bool keep=TRUE)
MeshDelta::GetVDataNum()
MeshDelta::AddVertexColors()
MeshDelta::AddMap(int mapID)
MeshDelta::AddVertexData(int vdChan, Mesh *m=NULL)
Mesh Interaction
MeshDelta::FillInFaces(Mesh & m)
MeshDelta::Apply(Mesh & m)
MeshDelta::PartsChanged()
Composition and Operators
MeshDeltas can be multiplied together like Transforms before being applied to a mesh. This is especially useful in Edit Mesh, where a single MeshDelta is used to store the current "state" of the Edit Mesh, and extra MeshDeltas are created for each operation and added on to the main MeshDelta.
An example of this is as follows: given a Mesh m that we want to divide a face on, then we want to break the vertex created in the face divide. These operations are adequately handled by the DivideFace and BreakVerts methods independently, but to combine the two into one operation, we must compose two MeshDeltas.
MeshDelta DivideThenBreak (const Mesh & m, int ff) {
MeshDelta md1, md2
Mesh mcopy = m
md1.DivideFace (mcopy, ff)
int nvid = md1.vnum // since DivideFace creates exactly one vertex, this must be its index in the result.
md1.Apply (mcopy)
md2.InitToMesh (mcopy) // second MeshDelta must be based on first MeshDelta result.
BitArray vset
vset.SetSize (mcopy.numVerts)
vset.Set (nvid)
md2.BreakVerts (mcopy, vset) // breaks the new vertex into a separate vert for each face.
md1.Compose (md2) // Adds the second MeshDelta into the first.
return md1
}
If all we wanted was to perform these operations on the mesh given, we could have done so without making the composition. The point here is to be able to construct complex MeshDeltas representing a series of user operations while remaining flexible enough to respond to changes in the actual mesh given as input. This is a central feature of the Edit Mesh modifier, completely rewritten for 3.0, found in MAXSDK/SAMPLES/MODIFIERS.
MeshDelta::Compose(MeshDelta & td)
MeshDelta::operator*=(MeshDelta & td)
MeshDelta::operator=(MeshDelta & td)
MeshDelta::ChangeFlags(Tab<DWORD> *mChannels=NULL)
MeshDelta::CopyMDChannels(MeshDelta & from, DWORD channels, Tab<DWORD> *mChannels=NULL)
Characteristics
The following methods give useful information about the MeshDelta.
MeshDelta::NumVMove(DWORD inVNum)
MeshDelta::NumVClone(DWORD inVNum)
MeshDelta::NumVDelete(DWORD inVNum)
MeshDelta::NumFDelete(DWORD inFNum)
MeshDelta::NumFCreate ()
MeshDelta::outVNum()
MeshDelta::outVNum(int inVNum)
MeshDelta::outFNum()
MeshDelta::outFNum(int inFNum)
MeshDelta::OutVert(Mesh &m, DWORD v)
MeshDelta::OutFace(Mesh &m, DWORD f)
MeshDelta::RemapID(DWORD ff)
MeshDelta::IsRemapped(DWORD ff, DWORD vid)
MeshDelta::MoveID(DWORD i)
MeshDelta::IsVCreate(DWORD i)
MeshDelta::IsVClone(DWORD i)
MeshDelta::VCloneOf(DWORD i)
MeshDelta::IsFCreate(DWORD i)
Lookup Table Methods
MeshDelta::UpdateLUTs(int extraV=0, int extraF=0)
MeshDelta::ClearLUTs()
MeshDelta::VLut(DWORD i)
MeshDelta::FLut(DWORD i)
MeshDelta::PostVIndex(DWORD i)
MeshDelta::PostFIndex(DWORD i)
Basic Operations
These operations are the "building blocks" of MeshDeltas. All of them may be safely performed on MeshDeltas that are already quite complex. Those that accept DWORD indices require output mesh indices, as all operations are appended to the end of the existing delta.
MeshDelta::Move(int i, const Point3 & p)
MeshDelta::Move(BitArray & sel, const Point3 & p)
MeshDelta::Move(VertMove *vm, int num)
MeshDelta::VCreate(Point3 *p, int num=1, BitArray *sel=NULL, BitArray *hide=NULL)
MeshDelta::VClone(DWORD *v, int num=1)
MeshDelta::VClone(DWORD *v, Point3 *off, int num=1)
MeshDelta::VClone(VertMove *vm, int num=1)
MeshDelta::VClone(DWORD v)
MeshDelta::VClone(DWORD v, Point3 off)
MeshDelta::VDelete(DWORD *v, int num=1)
MeshDelta::VDelete(BitArray & vdel)
MeshDelta::FCreate(Face *f, int num=1)
MeshDelta::FCreate(FaceCreate *f, int num=1)
MeshDelta::FCreateQuad(DWORD *v, DWORD smG=0, MtlID matID=0, int orig=UNDEFINED)
MeshDelta::FClone(Face & f, DWORD ff, DWORD remapFlags=0, DWORD *v=NULL)
MeshDelta::CreateDefaultMapFaces(int num=1)
MeshDelta::FRemap(FaceRemap *f, int num=1)
MeshDelta::FRemap(DWORD f, DWORD flags, DWORD *v)
MeshDelta::FChange(FaceChange *f, int num=1)
MeshDelta::FChange(DWORD f, DWORD flags, DWORD dat)
MeshDelta::SetMatID(DWORD f, MtlID mt)
MeshDelta::SetEdgeVis(DWORD f, DWORD ed, BOOL vis=TRUE)
MeshDelta::FSmooth(FaceSmooth *f, int num=1)
MeshDelta::FSmooth(DWORD f, DWORD mask, DWORD val)
MeshDelta::SetSmGroup(DWORD f, DWORD smG)
MeshDelta::FDelete(DWORD *f, int num=1)
MeshDelta::FDelete(BitArray & fdel)
Advanced Additive Operations
The following are more complex operations, built out of the simple operations above. The mesh given is expected to be result of the current MeshDelta. They should all work no matter how complex the current MeshDelta is, but they have not been extensively tested on complex MeshDeltas. To see how most of these work, look at Editable Mesh or Edit Mesh, both of which have source in MAXSDK/SAMPLES.
MeshDelta::AutoSmooth(Mesh & m, BitArray sel, float angle, AdjFaceList *af=NULL, AdjEdgeList *ae=NULL)
MeshDelta::Bevel(Mesh & m, BitArray vset, float outline, Tab<Point3> *odir, float height, Tab<Point3> *hdir)
MeshDelta::CreatePolygon(Mesh & m, int deg, int *v, DWORD smG=0, MtlID matID=0)
MeshDelta::DeleteVertSet(Mesh & m, BitArray sel)
MeshDelta::DeleteEdgeSet(Mesh & m, BitArray sel)
MeshDelta::DeleteFaceSet(Mesh & m, BitArray sel)
MeshDelta::DeleteSelected(Mesh & m)
MeshDelta::DeleteIsoVerts(Mesh & m)
MeshDelta::FlipNormal(Mesh & m, DWORD face)
MeshDelta::MakeSelFacesPlanar(Mesh & m, BitArray sel)
MeshDelta::MakeSelVertsPlanar(Mesh & m, BitArray sel)
MeshDelta::MoveVertsToPlane(Mesh & m, BitArray sel, Point3 & N, float offset)
MeshDelta::RestrictMatIDs(Mesh & m, int numMats)
MeshDelta::SelectFacesByFlags(Mesh & m, BOOL onoff, DWORD flagmask, DWORD flags)
Advanced Operations
The following will initialize to the mesh given: they can't be used to "add" ops to an existing MeshDelta. (To add these ops, make a new MeshDelta, call one of the following, and append it to your previous one with Compose.) To see how most of these work, look at Editable Mesh or Edit Mesh, both of which have source in MAXSDK/SAMPLES.
MeshDelta::AttachMesh(Mesh & m, Mesh & attachment, Matrix3 & relativeTransform, int matOffset)
MeshDelta::BreakVerts(Mesh & m, BitArray vset)
MeshDelta::ChamferEdges(Mesh & m, BitArray eset, MeshChamferData & mcd, AdjEdgeList *ae=NULL)
MeshDelta::ChamferMove(Mesh & m, MeshChamferData & mcd, float amount, AdjEdgeList *ae=NULL)
MeshDelta::ChamferVertices(Mesh & m, BitArray vset, MeshChamferData & mcd, AdjEdgeList *ae=NULL)
MeshDelta::CloneFaces(Mesh & m, BitArray fset)
MeshDelta::CloneVerts(Mesh & m, BitArray vset)
MeshDelta::CollapseEdges(Mesh & m, BitArray ecol, AdjEdgeList *ae=NULL)
MeshDelta::Cut(Mesh & m, DWORD ed1, float prop1, DWORD ed2, float prop2, Point3 &norm, bool fixNeighbors=TRUE, bool split=FALSE)
MeshDelta::Detach(Mesh & m, Mesh *out, BitArray fset, BOOL faces, BOOL del, BOOL elem)
MeshDelta::DivideEdge(Mesh & m, DWORD ed, float prop=.5f, AdjEdgeList *el=NULL, bool visDiag1=FALSE, bool fixNeighbors=TRUE, bool visDiag2=FALSE, bool split=FALSE)
MeshDelta::DivideEdges(Mesh & m, BitArray eset, AdjEdgeList *el=NULL)
MeshDelta::DivideFace(Mesh & m, DWORD f, float *bary=NULL)
MeshDelta::DivideFaces(Mesh & m, BitArray fset, MeshOpProgress *mop=NULL)
MeshDelta::EdgeTessellate(Mesh & m, BitArray fset, float tens, AdjEdgeList *ae=NULL, AdjFaceList *af=NULL, MeshOpProgress *mop=NULL)
MeshDelta::ExplodeFaces(Mesh & m, float thresh, bool useFaceSel=FALSE, AdjFaceList *af=NULL)
MeshDelta::ExtrudeEdges(Mesh & m, BitArray eset, Tab<Point3> *edir=NULL)
MeshDelta::ExtrudeFaces(Mesh & m, BitArray fset, AdjEdgeList *el=NULL)
MeshDelta::ResetVertWeights(Mesh & m)
MeshDelta::SetFaceColors(Mesh & m, BitArray fset, VertColor vc , int mp=0)
MeshDelta::SetVertColors(Mesh & m, BitArray vset, VertColor vc , int mp=0)
MeshDelta::SetFaceAlpha (Mesh &m, BitArray fset, float alpha, int mp=MAP_ALPHA)
MeshDelta::SetVertAlpha (Mesh &m, BitArray vset, float alpha, int mp=MAP_ALPHA)
MeshDelta::ResetVertCorners (Mesh & m)
MeshDelta::SetVertWeights(Mesh & m, BitArray vset, float weight)
MeshDelta::Slice(Mesh & m, Point3 N, float off, bool sep=FALSE, bool remove=FALSE, BitArray *fslice=NULL, AdjEdgeList *ae=NULL)
MeshDelta::TurnEdge(Mesh & m, DWORD ed, AdjEdgeList *el=NULL)
MeshDelta::WeldByThreshold(Mesh & m, BitArray vset, float thresh)
MeshDelta::WeldVertSet(Mesh & m, BitArray vset, Point3 *weldPoint=NULL)
MeshDelta::PropagateFacing(Mesh & m, BitArray & fset, int face, AdjFaceList & af, BitArray & done, BOOL bias=1)
MeshDelta::UnifyNormals(Mesh & m, BitArray fset, AdjFaceList *af=NULL)
I/O, Debugging
MeshDelta::Save(ISave *save)
MeshDelta::Load(ILoad *load)
MeshDelta::MyDebugPrint(bool lut=FALSE, bool mp=FALSE)