本文整理汇总了C++中PatchObject::GetPoint方法的典型用法代码示例。如果您正苦于以下问题:C++ PatchObject::GetPoint方法的具体用法?C++ PatchObject::GetPoint怎么用?C++ PatchObject::GetPoint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PatchObject
的用法示例。
在下文中一共展示了PatchObject::GetPoint方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ModifyObject
//.........这里部分代码省略.........
if ((selLevel==MESH_FACE) && mesh->faceSel[i]) rd->sel.Set(v[j]);
if ((selLevel==MESH_EDGE) && mesh->edgeSel[i*3+j]) rd->sel.Set(v[j]);
if ((selLevel==MESH_EDGE) && mesh->edgeSel[i*3+(j+2)%3]) rd->sel.Set(v[j]);
origmax = max = rd->nbor[v[j]].Count();
rd->fnum[v[j]]++;
for (k1=0; k1<max; k1++) if (rd->nbor[v[j]][k1] == v[(j+1)%3]) break;
if (k1==max) { rd->nbor[v[j]].Append (1, v+(j+1)%3, 1); max++; }
for (k2=0; k2<max; k2++) if (rd->nbor[v[j]][k2] == v[(j+2)%3]) break;
if (k2==max) { rd->nbor[v[j]].Append (1, v+(j+2)%3, 1); max++; }
if (max>origmax) rd->vis[v[j]].SetSize (max, TRUE);
if (mesh->faces[i].getEdgeVis (j)) rd->vis[v[j]].Set (k1);
else if (k1>=origmax) rd->vis[v[j]].Clear (k1);
if (mesh->faces[i].getEdgeVis ((j+2)%3)) rd->vis[v[j]].Set (k2);
else if (k2>= origmax) rd->vis[v[j]].Clear (k2);
}
}
// mjm - begin - 4.8.99
// if (selLevel==MESH_VERTEX) rd->sel = mesh->vertSel;
if (selLevel==MESH_VERTEX)
rd->sel = mesh->vertSel;
else if (selLevel==MESH_OBJECT)
rd->sel.SetAll ();
// mjm - end
rd->ivalid = os->obj->ChannelValidity (t, TOPO_CHAN_NUM);
rd->ivalid &= os->obj->ChannelValidity (t, SUBSEL_TYPE_CHAN_NUM);
rd->ivalid &= os->obj->ChannelValidity (t, SELECT_CHAN_NUM);
}
Tab<float> vangles;
if (saddle) vangles.SetCount (rd->vnum);
Point3 *hold = new Point3[rd->vnum];
int act;
for (int k=0; k<iter; k++) {
for (i=0; i<rd->vnum; i++) hold[i] = triObj->GetPoint(i);
if (saddle) mesh->FindVertexAngles (vangles.Addr(0));
for (i=0; i<rd->vnum; i++) {
// mjm - begin - 4.8.99
// if ((selLevel!=MESH_OBJECT) && (!rd->sel[i])) continue;
if ( (!rd->sel[i] ) && (!vsw || vsw[i] == 0) ) continue;
// mjm - end
if (saddle && (vangles[i] <= 2*PI*.99999f)) continue;
max = rd->nbor[i].Count();
if (boundary && (rd->fnum[i] < max)) continue;
if (max<1) continue;
Point3 avg(0.0f, 0.0f, 0.0f);
for (j=0,act=0; j<max; j++) {
if (!rd->vis[i][j]) continue;
act++;
avg += hold[rd->nbor[i][j]];
}
if (act<1) continue;
// mjm - begin - 4.8.99
wtdRelax = (!rd->sel[i]) ? relax * vsw[i] : relax;
triObj->SetPoint (i, hold[i]*(1-wtdRelax) + avg*wtdRelax/((float)act));
// triObj->SetPoint (i, hold[i]*(1-relax) + avg*relax/((float)act));
// mjm - end
}
}
delete [] hold;
}
if (polyObj) {
int i, j, max;
MNMesh & mm = polyObj->mm;
float *vsw = (mm.selLevel!=MNM_SL_OBJECT) ? mm.getVSelectionWeights() : NULL;