The methods in this class are grouped below.
(Links go to the
MNMesh Class Reference page.)
- Initialization & Cleanup
- MNMesh::MNMesh()
MNMesh::MNMesh(const Mesh &from)
MNMesh::MNMesh(const MNMesh
&from)
MNMesh::~MNMesh()
MNMesh::M(int mp) const;
MNMesh::DefaultFlags()
MNMesh::Init()
MNMesh::VAlloc(int
num, bool keep=TRUE)
MNMesh::VShrink(int num=-1)
MNMesh::freeVEdge()
MNMesh::VEdgeAlloc()
MNMesh::freeVFace()
MNMesh::VFaceAlloc()
MNMesh::EAlloc(int
num, bool keep=TRUE)
MNMesh::EShrink(int num=-1)
MNMesh::FAlloc(int
num, bool keep=TRUE)
MNMesh::FShrink(int num=-1)
MNMesh::MAlloc(int
num, bool keep=TRUE)
MNMesh::MShrink(int num=-1)
MNMesh::PrepForPipeline ()
MNMesh::GetInterface(Interface_ID
id)
- I/O with regular meshes
-
MNMesh::SetFromTri(const Mesh & from)
MNMesh::AddTri(const
Mesh & from)
MNMesh::OutToTri(Mesh
& tmesh)
- Access to components
- MNMesh::VNum()
MNMesh::V(int i)
const;
MNMesh::P(int i)
const;
MNMesh::ENum()
MNMesh::E(int i)
const;
MNMesh::FNum()
MNMesh::F(int i)
const;
MNMesh::SetMapNum(int mpnum)
MNMesh::InitMap(int mp)
MNMesh::ClearMap(int mp)
MNMesh::MV(int
mp, int i) const;
MNMesh::MF(int mp, int i) const;
MNMesh::TriNum() const;
MNMesh::setNumVData(int
ct, BOOL keep=FALSE)
MNMesh::VDNum() const;
MNMesh::vDataSupport(int vdChan) const;
MNMesh::setVDataSupport(int vdChan, BOOL support=TRUE)
MNMesh::vertexData(int vdChan) const;
MNMesh::vertexFloat(int vdChan) const;
MNMesh::freeVData(int
vdChan)
MNMesh::freeAllVData()
MNMesh::getVertexWeights()
MNMesh::SupportVertexWeights()
MNMesh::freeVertexWeights()
MNMesh::getVSelectionWeights()
MNMesh::SupportVSelectionWeights()
MNMesh::freeVSelectionWeights()
MNMesh::setNumEData(int
ct, BOOL keep=FALSE)
MNMesh::EDNum() const;
MNMesh::eDataSupport(int edChan) const;
MNMesh::setEDataSupport(int edChan, BOOL support=TRUE)
MNMesh::edgeData(int edChan) const;
MNMesh::edgeFloat(int edChan) const;
MNMesh::freeEData(int
edChan)
MNMesh::freeAllEData()
MNMesh::getEdgeKnots()
MNMesh::SupportEdgeKnots()
MNMesh::freeEdgeKnots()
MNMesh::VClear(int vv)
MNMesh::VInit(int vv)
MNMesh::VFaceIndex(int
vv, int ff, int ee=-1)
MNMesh::VEdgeIndex(int
vv, int ee)
MNMesh::VDeleteEdge(int
vv, int ee)
MNMesh::VDeleteFace(int
vv, int ff)
MNMesh::VReplaceEdge(int
vv, int oe, int ne)
MNMesh::VReplaceFace(int
vv, int of, int nf)
MNMesh::CopyVert(int
nv, int ov)
MNMesh::MNVDebugPrint(int
vv)
MNMesh::SubObjectHitTest(GraphicsWindow *gw, Material *ma,
HitRegion *hr, DWORD flags, SubObjHitList&
hitList, int numMat=1 )
MNMesh::UpdateDisplayVertexColors ()
MNMesh::SetDisplayVertexColors (int chan)
MNMesh::SetDisplayVertexColors (UVVert *mv,
MNMapFace *mf)
MNMesh::FillInFaceEdges()
MNMesh::FillInVertEdgesFaces()
MNMesh::getBoundingBox(Matrix3 *tm=NULL, bool
targonly=FALSE)
MNMesh::ComputeNormal(int ff, Point3 & N, Point3 *ctr=NULL)
MNMesh::GetVertexSpace (int vrt, Matrix3 & tm)
MNMesh::EdgeAngle(int
ed)
MNMesh::FlipNormal(int faceIndex)
MNMesh::AutoSmooth(float angle, BOOL useSel, BOOL
preventIndirectSmoothing)
MNMesh::RestrictPolySize (int maxdeg)
MNMesh::MakePlanar(float planarThresh)
MNMesh::MakeFacePlanar(int
ff, float planarThresh)
MNMesh::ExtrapolateMapValue(int face, int edge, Point3 & pt,
int mp)
MNMesh::EliminateDoubledMappingVerts()
MNMesh::CheckForDoubledMappingVerts()
MNMesh::EliminateIsoMapVerts()
MNMesh::EliminateIsoMapVerts(int
mp)
MNMesh::SplitEdge(int ee, float prop, Tab<int>
*newTVerts)
MNMesh::FacePointBary (int ff, Point3 & p, Tab<float> & bary)
MNMesh::CloneVerts(DWORD cloneFlag = MN_SEL, bool
clear_orig=TRUE)
MNMesh::CloneFaces(DWORD cloneFlag = MN_SEL, bool
clear_orig=TRUE)
MNMesh::DivideFace(int ff, Tab<float> & bary)
MNMesh::CreateFace(int
degg, int *vv)
MNMesh::MakeFlaggedPlanar(int selLev, DWORD flag=MN_SEL,
Point3
*delta=NULL)
MNMesh::MoveVertsToPlane(Point3 & norm, float offset, DWORD
flag=MN_SEL, Point3
*delta=NULL)
MNMesh::SplitFlaggedVertices(DWORD flag=MN_SEL)
MNMesh::SplitFlaggedEdges(DWORD flag=MN_SEL)
MNMesh::DetachFaces(DWORD flag=MN_SEL)
MNMesh::DetachElementToObject(MNMesh
& nmesh, DWORD fflags=MN_SEL, bool delDetached=true)
MNMesh::ExtrudeFaceClusters(MNFaceClusters & fclust)
MNMesh::ExtrudeFaceCluster(MNFaceClusters & fclust, int
cl)
MNMesh::ExtrudeFaces(DWORD flag=MN_SEL)
MNMesh::GetExtrudeDirection(MNChamferData
*mcd,
MNFaceClusters *fclust=NULL, Point3 *clustNormals=NULL)
MNMesh::SetVertColor(UVVert
clr, int mp, DWORD flag=MN_SEL)
MNMesh::SetFaceColor(UVVert
clr, int mp, DWORD flag=MN_SEL)
MNMesh::ChamferVertices(DWORD flag=MN_SEL,
MNChamferData *mcd=NULL)
MNMesh::ChamferEdges(DWORD flag=MN_SEL,
MNChamferData *mcd=NULL)
MNMesh::FlipElementNormals(DWORD
flag=MN_SEL)
MNMesh::SmoothByCreases(DWORD creaseFlag)
MNMesh::CutFace(int f1, Point3 & p1, Point3 & p2, Point3
& Z, bool split)
MNMesh::CutEdge(int e1, float prop1, int e2, float prop2, Point3
& Z, bool split)
MNMesh::Cut(int startv, Point3 & end, Point3 & Z, bool
split)
MNMesh::WeldBorderVerts(int
v1, int v2, Point3 *destination)
MNMesh::WeldBorderEdges(int
e1, int e2)
MNMesh::WeldBorderVerts(float
thresh, DWORD flag=MN_SEL)
- Adding new components
- NOTE: All face creation methods clear the MN_MESH_FILLED_IN,
MN_MESH_NO_BAD_VERTS, and MN_MESH_VERTS_ORDERED flags. If your
calling routine takes care of the work of updating or creating all
relevant MNVertices and MNEdges, you may be able to set these flags
again -- but be careful! For some convenient face & edge
subdivision methods that preserve a complete topology, check out
the Splitting methods.
MNMesh::NewTri(int a, int b, int c,
DWORD smG=0, MtlID mt=0)
MNMesh::NewTri(int *vv, int *tt, int
*cc, DWORD smG=0, MtlID mt=0)
MNMesh::NewQuad(int a,
int b, int c, int d, DWORD smG=0, MtlID mt=0)
MNMesh::NewQuad(int *vv,
int *tt, int *cc, DWORD smG=0, MtlID mt=0)
MNMesh::NewFace(MNFace *ff, int
degg=0, int *vv=NULL, bool *vis=NULL, bool *sel=NULL)
MNMesh::AppendNewFaces(int
nfnum)
MNMesh::setNumFaces(int
nfnum)
MNMesh::RegisterEdge(int v1, int v2, int f,
int fpos)
MNMesh::SimpleNewEdge(int v1, int
v2)
MNMesh::NewEdge(int v1, int v2, int f, int
fpos)
MNMesh::AppendNewEdges(int
nenum)
MNMesh::setNumEdges(int
nenum)
MNMesh::NewVert(Point3 &p)
MNMesh::NewVert(Point3
&p, int vid)
MNMesh::NewVert(int vid)
MNMesh::NewVert(int v1, int v2, float prop)
MNMesh::AppendNewVerts(int
nvnum)
MNMesh::setNumVerts(int
nvnum)
- Removing & Deleting Components
-
MNMesh::CollapseDeadVerts()
MNMesh::CollapseDeadEdges()
MNMesh::CollapseDeadFaces()
MNMesh::CollapseDeadStructs()
MNMesh::Clear()
MNMesh::ClearAndFree()
MNMesh::freeVerts()
MNMesh::freeEdges()
MNMesh::freeFaces()
MNMesh::freeMap(int
mp)
MNMesh::freeMaps()
MNMesh::DeleteFlaggedFaces(DWORD deathflags, DWORD
nvCopyFlags=0x0)
MNMesh::SetDispFlag(DWORD
f)
MNMesh::GetDispFlag(DWORD
f)
MNMesh::ClearDispFlag(DWORD
f)
- Internal computation
-
MNMesh::FillInMesh()
MNMesh::EliminateBadVerts(DWORD flag=0)
MNMesh::OrderVert(int vid)
MNMesh::OrderVerts()
MNMesh::Triangulate()
MNMesh::TriangulateFace(int ff)
MNMesh::InvalidateTopoCache()
MNMesh::Transform(Matrix3
&xfm)
MNMesh::IsClosed()
MNMesh::BBox(Box3
& bbox, bool targonly=FALSE)
MNMesh::checkNormals(BOOL illum)
MNMesh::buildNormals()
MNMesh::buildRenderNormals()
MNMesh::UpdateBackfacing(GraphicsWindow *gw, bool force)
MNMesh::render(GraphicsWindow *gw, Material *ma, RECT *rp, int
compFlags, int numMat=1, InterfaceServer *pi=NULL)
MNMesh::renderFace(GraphicsWindow
*gw, int ff)
MNMesh::render3DFace(GraphicsWindow *gw, int ff)
MNMesh::render3DDiagonals(GraphicsWindow *gw, DWORD
compFlags)
MNMesh::renderDiagonals(GraphicsWindow
*gw, DWORD compFlags)
MNMesh::renderDiagonal(GraphicsWindow *gw, int ff,
bool useSegments=false, bool *lastColorSubSel=NULL)
MNMesh::render3DEdges(GraphicsWindow *gw, DWORD
compFlags)
MNMesh::renderEdges(GraphicsWindow
*gw, DWORD compFlags)
MNMesh::renderEdge(GraphicsWindow *gw, int ee,
bool useSegments=false, bool *lastColorSubSel=NULL)
MNMesh::select(GraphicsWindow *gw, Material *ma,
HitRegion *hr, int abortOnHit=FALSE, int numMat=1)
- Component Targeting & Flag methods
- MNMesh::ClearVFlags(DWORD
fl)
MNMesh::ClearEFlags(DWORD
fl)
MNMesh::ClearFFlags(DWORD
fl)
MNMesh::PaintFaceFlag(int ff, DWORD fl, DWORD
fenceflags=0x0)
MNMesh::VertexSelect(const BitArray & vsel)
MNMesh::EdgeSelect(const BitArray & esel)
MNMesh::FaceSelect(const BitArray & fsel)
MNMesh::getVertexSel(BitArray & vsel)
MNMesh::getEdgeSel(BitArray
& esel)
MNMesh::getFaceSel(BitArray
& fsel)
MNMesh::getVerticesByFlag(BitArray & vset, DWORD flags,
DWORD fmask=0x0)
MNMesh::getEdgesByFlag(BitArray & eset, DWORD flags,
DWORD fmask=0x0)
MNMesh::getFacesByFlag(BitArray & fset, DWORD flags,
DWORD fmask=0x0)
MNMesh::ElementFromFace(int ff, BitArray & fset)
MNMesh::BorderFromEdge(int ee, BitArray & eset)
MNMesh::SetEdgeVis(int ee, BOOL vis=TRUE)
MNMesh::SetEdgeSel(int ee, BOOL sel=TRUE)
MNMesh::TargetVertsBySelection(int
selLevel)
MNMesh::TargetEdgesBySelection(int
selLevel)
MNMesh::TargetFacesBySelection(int
selLevel)
MNMesh::PropegateComponentFlags(DWORD slTo, DWORD flTo, DWORD
slFrom, DWORD flFrom, bool ampersand=FALSE, bool set=TRUE)
MNMesh::DetargetVertsBySharpness(float sharpval)
MNMesh::FenceMaterials()
MNMesh::FenceSmGroups()
MNMesh::FenceFaceSel()
MNMesh::FenceOneSidedEdges()
MNMesh::FenceNonPlanarEdges(float thresh=.9999f, bool
makevis=FALSE)
MNMesh::SetMapSeamFlags()
MNMesh::SetMapSeamFlags(int mp)
MNMesh::PrepForPipeline ()
- Component information methods
- In the following face center methods, hidden vertices have no
effect.
MNMesh::ComputeCenters(Point3 *ctr, bool targonly=FALSE)
MNMesh::ComputeCenter(int ff, Point3 & ctr)
MNMesh::ComputeSafeCenters(Point3 *ctr, bool targonly=FALSE, bool
detarg=FALSE)
MNMesh::ComputeSafeCenter(int
ff, Point3 & ctr)
MNMesh::RetriangulateFace(int ff)
MNMesh::BestConvexDiagonals(int ff, int *diag=NULL)
MNMesh::BestConvexDiagonals(int deg, int *vv, int *diag)
MNMesh::FindDiagonals(int ff, int *diag)
MNMesh::FindDiagonals(int deg, int *vv, int *diag)
MNMesh::FaceBBox(int ff, Box3 & bbox)
MNMesh::FindEdgeFromVertToVert(int vrt1, int vrt2)
MNMesh::GetVertexSpace(int vrt, Matrix3 & tm)
MNMesh::GetVertexNormal(int
vrt)
MNMesh::GetEdgeNormal(int
ed)
MNMesh::GetFaceNormal(int
fc, bool nrmlz=FALSE)
MNMesh::FlipNormal(int faceIndex)
MNMesh::GetEdgeNormal(int vrt1, int vrt2)
MNMesh::FindFacePointTri(int ff, Point3 & pt, double *bary, int
*tri)
MNMesh::FindFacePointMapValue(int
ff, Point3 & pt, int mp)
MNMesh::IntersectRay(Ray& ray, float& at, Point3&
norm)
MNMesh::IntersectRay(Ray& ray, float& at, Point3& norm,
int &fi, Tab<float> & bary)
MNMesh::VertexTempSel(DWORD fmask=MN_DEAD|MN_SEL, DWORD
fset=MN_SEL)
MNMesh::ShallowCopy(MNMesh
*amesh, ChannelMask channels)
MNMesh::NewAndCopyChannels(ChannelMask
channels)
MNMesh::FreeChannels(ULONG_PTR
channels, BOOL zeroOthers=1)
- Smoothing-group & Material methods
-
MNMesh::Resmooth(bool smooth=TRUE, bool targonly=FALSE, DWORD
targmask=~0x0)
MNMesh::CommonSmoothing(bool targonly=FALSE)
MNMesh::GetAllSmGroups(bool
targonly=FALSE)
MNMesh::GetNewSmGroup(bool targonly=FALSE)
MNMesh::FindReplacementSmGroup(int ff, DWORD os)
MNMesh::PaintNewSmGroup(int ff, DWORD os, DWORD ns)
MNMesh::SeparateSmGroups(int v1, int v2)
MNMesh::GetNewMtlID(bool targonly = FALSE)
MNMesh::GetOldSmGroup(bool targonly=FALSE)
MNMesh::AutoSmooth(float angle,BOOL useSel,BOOL
preventIndirectSmoothing)
MNMesh::ApplyMapper(UVWMapper & mp, BOOL channel=0,
BOOL useSel=FALSE)
- Face-joining methods
- MNMesh::MakePolyMesh()
MNMesh::MakeConvexPolyMesh()
MNMesh::RemoveEdge(int
edge)
MNMesh::MakeConvex()
MNMesh::MakeFaceConvex(int
ff)
MNMesh::EliminateCollinearVerts()
MNMesh::EliminateCoincidentVerts(float thresh=MNEPS)
- Splitting Methods
-
MNMesh::SplitEdge(int ee, float prop=.5f)
MNMesh::SplitEdge(int ff, int ed, float prop, bool right, int
*nf=NULL, int *ne=NULL, bool neVis=FALSE, bool neSel=FALSE, bool
allconvex=FALSE)
MNMesh::SplitTriEdge(int ee, float prop=.5f, float
thresh=MNEPS, bool neVis=TRUE, bool neSel=FALSE)
MNMesh::IndentFace(int ff, int ei, int nv, int *ne=NULL, bool
nevis=TRUE, bool nesel=FALSE)
MNMesh::SeparateFace(int ff, int a, int b, int &nf, int
&ne, bool neVis, bool neSel)
MNMesh::Slice(Point3
&N, float off, float thresh, bool split, bool remove, bool
flaggedFacesOnly=false, DWORD faceFlags=MN_SEL)
MNMesh::SplitTriFace(int ff, double *bary=NULL, float
thresh=MNEPS, bool neVis=TRUE, bool neSel=FALSE)
MNMesh::SplitTri6(int ff, double *bary=NULL, int
*nv=NULL)
- Border methods
- MNMesh::GetBorder(MNMeshBorder
& brd, DWORD selLevel=MESH_OBJECT)
MNMesh::FillInBorders(MNMeshBorder
*b=NULL)
MNMesh::FindOpenRegions()
- Tessellation & related methods
-
MNMesh::Relax(float relaxval, bool targonly=TRUE)
MNMesh::FindEdgeListMapVerts(const Tab<int> & lp,
Tab<int> & mv, int mp)
MNMesh::AndersonDo(float
interp, DWORD selLevel, MeshOpProgress
*mop=NULL, DWORD subdivFlags=0)
MNMesh::TessellateByEdges(float
bulge, MeshOpProgress
*mop=NULL)
MNMesh::TessellateByCenters()
MNMesh::SabinDoo(float
interp, DWORD selLevel, MeshOpProgress
*mop=NULL, Tab<Point3> *offsets=NULL)
MNMesh::SabinDooVert(int vid, float interp, DWORD selLevel,
Point3 *ctr, MeshOpProgress
*mop=NULL, Tab<Point3> *offsets=NULL)
MNMesh::CubicNURMS(MeshOpProgress
*mop=NULL, Tab<Point3> *offsets=NULL, DWORD
subdivFlags=0)
MNMesh::CheckForDoubledMappingVerts()
MNMesh::EliminateDoubledMappingVerts()
MNMesh::EliminateIsoMapVerts()
MNMesh::EliminateIsoMapVerts(int
mp)
- Welding methods
- MNMesh::WeldVerts(int
a, int b)
MNMesh::WeldEdge(int ee)
MNMesh::WeldBorderVerts
(int v1, int v2, Point3
*destination)
MNMesh::WeldBorderEdges
(int e1, int e2)
MNMesh::WeldBorderVerts
(float thresh, DWORD flag=MN_SEL)
MNMesh::DetachElementToObject (MNMesh
& nmesh, DWORD fflags=MN_SEL, bool delDetached=true)
- Boolean operations
- MNMesh::PrepForBoolean()
MNMesh::BooleanCut(MNMesh
& m2, int cutType, int fstart=0, MeshOpProgress
*mop=NULL)
MNMesh::MakeBoolean(MNMesh
& m1,
MNMesh & m2, int type, MeshOpProgress
*mop=NULL)
MNMesh::ConnectLoops (Tab<int> & loop1, Tab<int> & loop2, int segs,
float tension, DWORD smGroup, MtlID mat, bool sm_ends)
MNMesh::Connect (MNMeshBorder
& borderList, int segs, float tension, bool sm_bridge, bool
sm_ends, Tab<int>
*vsep=NULL)
MNMesh::InvalidateGeomCache()
MNMesh::InvalidateTopoCache()
MNMesh::allocRVerts()
MNMesh::updateRVerts(GraphicsWindow *gw)
MNMesh::freeRVerts()
- Debugging Methods
- Please see the
MNMesh Notes on Debugging for more information.
MNMesh::MNDebugPrint(bool
triprint=FALSE)
MNMesh::MNDebugPrintVertexNeighborhood(int vv, bool
triprint=FALSE)
MNMesh::CheckAllData()
- Operators
- MNMesh::operator=(const MNMesh &
from)
MNMesh::operator+=(const MNMesh &
from)
MNMesh::ClearSpecifiedNormals
()
MNMesh::SpecifyNormals
()
MNMesh::GetSpecifiedNormals()
MNMesh::GetSpecifiedNormalsForDisplay()
MNMesh::CopyBasics (const
MNMesh & from, bool copyEdges = false)