本文整理汇总了C++中PatchObject::SetPoint方法的典型用法代码示例。如果您正苦于以下问题:C++ PatchObject::SetPoint方法的具体用法?C++ PatchObject::SetPoint怎么用?C++ PatchObject::SetPoint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PatchObject
的用法示例。
在下文中一共展示了PatchObject::SetPoint方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ModifyObject
//.........这里部分代码省略.........
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;
if (rd->ivalid.InInterval(t) && (mm.numv != rd->vnum)) {
// Shouldn't happen, but does with Loft bug and may with other bugs.
rd->ivalid.SetEmpty ();
}
if (!rd->ivalid.InInterval(t)) {
rd->SetVNum (mm.numv);
for (i=0; i<rd->vnum; i++) {
rd->fnum[i]=0;
rd->nbor[i].ZeroCount();
}
rd->sel = mm.VertexTempSel ();
int k1, k2, origmax;
for (i=0; i<mm.numf; i++) {
int deg = mm.f[i].deg;
int *vtx = mm.f[i].vtx;
for (j=0; j<deg; j++) {
Tab<DWORD> & nbor = rd->nbor[vtx[j]];
origmax = max = nbor.Count();
rd->fnum[vtx[j]]++;