本文整理汇总了C++中MeshModel::id方法的典型用法代码示例。如果您正苦于以下问题:C++ MeshModel::id方法的具体用法?C++ MeshModel::id怎么用?C++ MeshModel::id使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MeshModel
的用法示例。
在下文中一共展示了MeshModel::id方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: currentId
Q_INVOKABLE int MeshDocumentSI::currentId()
{
MeshModel* model = md->mm();
if (model != NULL)
return model->id();
else
return -1;
}
示例2: applyFilter
bool FilterScreenedPoissonPlugin::applyFilter( const QString& filterName,MeshDocument& md,EnvWrap& env, vcg::CallBackPos* cb)
{
if (filterName == "Screened Poisson Surface Reconstruction")
{
MeshModel *mm =md.mm();
MeshModel *pm =md.addNewMesh("","Poisson mesh",false);
md.setVisible(pm->id(),false);
pm->updateDataMask(MeshModel::MM_VERTQUALITY);
PoissonParam<Scalarm> pp;
MeshModelPointStream<Scalarm> meshStream(mm->cm);
MeshDocumentPointStream<Scalarm> documentStream(md);
pp.MaxDepthVal = env.evalInt("depth");
pp.FullDepthVal = env.evalInt("fullDepth");
pp.CGDepthVal= env.evalInt("cgDepth");
pp.ScaleVal = env.evalFloat("scale");
pp.SamplesPerNodeVal = env.evalFloat("samplesPerNode");
pp.PointWeightVal = env.evalFloat("pointWeight");
pp.ItersVal = env.evalInt("iters");
pp.ConfidenceFlag = env.evalBool("confidence");
pp.NormalWeightsFlag = env.evalBool("nWeights");
pp.DensityFlag = true;
if(env.evalBool("visibleLayer"))
{
MeshModel *m=0;
while(m=md.nextVisibleMesh(m))
PoissonClean(m->cm, (pp.ConfidenceFlag || pp.NormalWeightsFlag));
Execute<Scalarm>(&documentStream,pm->cm,pp,cb);
}
else
{
PoissonClean(mm->cm, (pp.ConfidenceFlag || pp.NormalWeightsFlag));
Execute<Scalarm>(&meshStream,pm->cm,pp,cb);
}
pm->UpdateBoxAndNormals();
md.setVisible(pm->id(),true);
return true;
}
return false;
}
示例3: StartEdit
bool QualityMapperPlugin::StartEdit(MeshModel& m, GLArea *gla )
{
if(!m.hasDataMask(MeshModel::MM_VERTQUALITY))
{
QMessageBox::warning(gla, tr("Quality Mapper"), tr("The model has no vertex quality"), QMessageBox::Ok);
return false;
}
QMap<int,RenderMode>::iterator it = gla->rendermodemap.find(m.id());
m.updateDataMask(MeshModel::MM_VERTCOLOR | MeshModel::MM_VERTQUALITY);
if (it != gla->rendermodemap.end())
{
it.value().setColorMode(GLW::CMPerVert);
gla->update();
}
if(_qualityMapperDialog==0)
_qualityMapperDialog = new QualityMapperDialog(gla->window(), m, gla);
//drawing histogram
//bool ret = _qualityMapperDialog->initEqualizerHistogram();
if ( !_qualityMapperDialog->initEqualizerHistogram() )
{
//EndEdit(m, gla);
return false;
}
//drawing transferFunction
_qualityMapperDialog->drawTransferFunction();
//dialog ready to be displayed. Show it now!
_qualityMapperDialog->show();
connect(_qualityMapperDialog, SIGNAL(closingDialog()),gla,SLOT(endEdit()) );
return true;
}