本文整理汇总了C++中VertexElement::getY方法的典型用法代码示例。如果您正苦于以下问题:C++ VertexElement::getY方法的具体用法?C++ VertexElement::getY怎么用?C++ VertexElement::getY使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VertexElement
的用法示例。
在下文中一共展示了VertexElement::getY方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ArgErr
//.........这里部分代码省略.........
uint ielt = 0;
for (vector<VertexElement*>::iterator vertele = vertelevec.begin(); vertele != vertele_end; ++vertele)
{
pElements.push_back(*vertele);
pVertexPerm[(*vertele)->getIDX()]=ielt;
ielt++;
}
}
// / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / //
else if (opt_method == 1)
{
/*
THIS ORIGINAL CODE REPLACED WITH NEW 'WALKING' METHOD. A DRAMATIC
REDUCTION IN BAND HALF-WIDTHS FOR COMPLEX 3D MESHES.
This is not the end of the story: TODO investigate whether reordering
a vertices neighbour's for the queue by distance will improve again.
*/
std::vector<double> com = centerOfMass();
double ** m = new double*[3];
for (uint i = 0; i < 3; i++)
{
m[i] = new double[3];
m[i][0] = 0.0;
m[i][1] = 0.0;
m[i][2] = 0.0;
}
for (uint ivert = 0; ivert < countVertices(); ivert++)
{
VertexElement* ve = getVertex(ivert);
double x = ve->getX() - com[0];
double y = ve->getY() - com[1];
double z = ve->getZ() - com[2];
m[0][0] += x * x;
m[0][1] += x * y;
m[0][2] += x * z;
m[1][0] += y * x;
m[1][1] += y * y;
m[1][2] += y * z;
m[2][0] += z * x;
m[2][1] += z * y;
m[2][2] += z * z;
}
uint iret;
double gamma;
double evec[3];
mainEvec(3, m, &iret, &gamma, evec);
if (iret != 1)
{
cout << "\nWarning - eigenvalue faliure " << endl;
}
for (uint i = 0; i < 3; i++)
{
delete[] m[i];
}
delete[] m;
double vx = evec[0];
double vy = evec[1];