Notifications
Clear all
[Closed] C++ Extruding Edges
Aug 21, 2015 5:07 pm
Hi, I am trying to extrude edges using MNMesh. I have been through EditPoly sample and believe I have all the code I need, but its not doing anything … any idea why? Code is below:
MNMesh* mm = &pTri->GetMesh();
mm->ClearAllFlags();
mm->CollapseDeadStructs();
for(int i = 0; i < mm->nume; i++) {mm->SetEdgeSel(i, TRUE);}
MNTempData *TempData = new MNTempData(mm);
MNChamferData *pChamData = TempData->ChamferData();
float height = 1.0f;
float width = 0.0f;
Tab<Point3> tUpDir;
int i;
mm->ExtrudeEdges(MN_SEL, pChamData, tUpDir);
// Move the points up:
for (i=0; i<tUpDir.Count(); i++){ mm->v[i].p += tUpDir[i]*height;}