本文整理汇总了C++中Geometry::appendFaceted方法的典型用法代码示例。如果您正苦于以下问题:C++ Geometry::appendFaceted方法的具体用法?C++ Geometry::appendFaceted怎么用?C++ Geometry::appendFaceted使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Geometry
的用法示例。
在下文中一共展示了Geometry::appendFaceted方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addTri
void Patch::addTri( const QVector3D &a, const QVector3D &b, const QVector3D &c,
const QVector3D &n )
{
QVector3D norm = n.isNull() ? QVector3D::normal( a, b, c ) : n;
if (sm == Smooth) {
geom->appendSmooth( a, norm, initv );
geom->appendSmooth( b, norm, initv );
geom->appendSmooth( c, norm, initv );
} else {
geom->appendFaceted( a, norm );
geom->appendFaceted( b, norm );
geom->appendFaceted( c, norm );
}
count += 3;
}
示例2: addQuad
void Patch::addQuad(const QVector3D &a, const QVector3D &b, const QVector3D &c, const QVector3D &d)
{
QVector3D norm = QVector3D::normal(a, b, c);
if (sm == Smooth) {
addTri(a, b, c, norm);
addTri(a, c, d, norm);
} else {
// If faceted share the two common vertices
addTri(a, b, c, norm);
int k = geom->vertices.count();
geom->appendSmooth(a, norm, k);
geom->appendSmooth(c, norm, k);
geom->appendFaceted(d, norm);
count += 3;
}
}