本文整理汇总了C++中cmesho::FacePointer::P方法的典型用法代码示例。如果您正苦于以下问题:C++ FacePointer::P方法的具体用法?C++ FacePointer::P怎么用?C++ FacePointer::P使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cmesho::FacePointer
的用法示例。
在下文中一共展示了FacePointer::P方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: fromBarCoords
/**
@def This funcion calculate the cartesian coordinates of a point given from its barycentric coordinates
@param Point3f bc - barycentric coordinates of the point
@param FacePointer f - pointer to the face
@return cartesian coordinates of the point
*/
CMeshO::CoordType fromBarCoords(Point3f bc,CMeshO::FacePointer f){
CMeshO::CoordType p;
Point3f p0=f->P(0);
Point3f p1=f->P(1);
Point3f p2=f->P(2);
p=f->P(0)*bc[0]+f->P(1)*bc[1]+f->P(2)*bc[2];
return p;
}
示例2: drawFace
//
// Draws a triangle
//
void edit_topo::drawFace(CMeshO::FacePointer fp)
{
glPointSize(3.0f);
glBegin(GL_POINTS); //GL_LINE_LOOP);
glVertex(fp->P(0));
glVertex(fp->P(1));
glVertex(fp->P(2));
glEnd();
}
示例3: drawFace
void LandmarkCapturePlugin::drawFace(CMeshO::FacePointer fp, MeshModel &m, GLArea *gla, QPainter *p)
{
//glDepthMask(GL_FALSE);
//glDisable(GL_DEPTH_TEST);
//p->endNativePainting();
//p->save();
//p->setRenderHint(QPainter::TextAntialiasing);
//p->setPen(Qt::white);
//QFont qFont;
//qFont.setStyleStrategy(QFont::NoAntialias);
//qFont.setFamily("Helvetica");
//qFont.setPixelSize(12);
//p->setFont(qFont);
QString buf = QString("f%1\n (%3 %4 %5)").arg(tri::Index(m.cm,fp)).arg(tri::Index(m.cm,fp->V(0))).arg(tri::Index(m.cm,fp->V(1))).arg(tri::Index(m.cm,fp->V(2)));
Point3f c=Barycenter(*fp);
vcg::glLabel::render(p,c,buf);
for(int i=0;i<3;++i)
{
buf =QString("\nv%1:%2 (%3 %4 %5)").arg(i).arg(fp->V(i) - &m.cm.vert[0]).arg(fp->P(i)[0]).arg(fp->P(i)[1]).arg(fp->P(i)[2]);
if( m.hasDataMask(MeshModel::MM_VERTQUALITY) )
buf +=QString(" - Q(%1)").arg(fp->V(i)->Q());
if( m.hasDataMask(MeshModel::MM_WEDGTEXCOORD) )
buf +=QString("- uv(%1 %2) id:%3").arg(fp->WT(i).U()).arg(fp->WT(i).V()).arg(fp->WT(i).N());
if( m.hasDataMask(MeshModel::MM_VERTTEXCOORD) )
buf +=QString("- uv(%1 %2) id:%3").arg(fp->V(i)->T().U()).arg(fp->V(i)->T().V()).arg(fp->V(i)->T().N());
vcg::glLabel::render(p,fp->V(i)->P(),buf);
}
//p->drawText(QRect(0,0,gla->width(),gla->height()), Qt::AlignLeft | Qt::TextWordWrap, buf);
//p->restore();
//p->beginNativePainting();
}