本文整理汇总了C++中PolyhedronPtr::points_end方法的典型用法代码示例。如果您正苦于以下问题:C++ PolyhedronPtr::points_end方法的具体用法?C++ PolyhedronPtr::points_end怎么用?C++ PolyhedronPtr::points_end使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PolyhedronPtr
的用法示例。
在下文中一共展示了PolyhedronPtr::points_end方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Rotation
void Various_Processing_Component::Rotation (PolyhedronPtr pMesh, double xAxis, double yAxis, double zAxis, double angle)
{
// normalize the translation vector
double normAxis = sqrt(xAxis*xAxis + yAxis*yAxis + zAxis*zAxis);
xAxis = xAxis / normAxis;
yAxis = yAxis / normAxis;
zAxis = zAxis / normAxis;
// construction of the rotation matrix
double c = cos(angle/180.0*PI);
double s = sin(angle/180.0*PI);
double m00 = xAxis*xAxis + (1.0-xAxis*xAxis)*c;
double m01 = xAxis*yAxis*(1.0-c) - zAxis*s;
double m02 = xAxis*zAxis*(1.0-c) + yAxis*s;
double m10 = xAxis*yAxis*(1.0-c) + zAxis*s;
double m11 = yAxis*yAxis + (1.0-yAxis*yAxis)*c;
double m12 = yAxis*zAxis*(1.0-c) - xAxis*s;
double m20 = xAxis*zAxis*(1.0-c) - yAxis*s;
double m21 = yAxis*zAxis*(1.0-c) + xAxis*s;
double m22 = zAxis*zAxis + (1.0-zAxis*zAxis)*c;
// realize rotation by applying general affine transformation through matrix multiplication
Affine_transformation rotation(m00, m01, m02, m10, m11, m12, m20, m21, m22);
std::transform(pMesh->points_begin(), pMesh->points_end(), pMesh->points_begin(), rotation);
pMesh->compute_normals();
}
示例2: UniformScaling
void Various_Processing_Component::UniformScaling (PolyhedronPtr pMesh, double scalingFactor)
{
Affine_transformation uniformScaling(CGAL::SCALING, scalingFactor);
std::transform(pMesh->points_begin(), pMesh->points_end(), pMesh->points_begin(), uniformScaling);
pMesh->compute_normals();
}
示例3: Translation
void Various_Processing_Component::Translation (PolyhedronPtr pMesh, double xTranslation, double yTranslation, double zTranslation)
{
Vector translationVector(xTranslation,yTranslation, zTranslation);
Affine_transformation translation(CGAL::TRANSLATION, translationVector);
std::transform(pMesh->points_begin(), pMesh->points_end(), pMesh->points_begin(), translation);
pMesh->compute_normals();
}