本文整理汇总了C++中Prefix::getInverse方法的典型用法代码示例。如果您正苦于以下问题:C++ Prefix::getInverse方法的具体用法?C++ Prefix::getInverse怎么用?C++ Prefix::getInverse使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Prefix
的用法示例。
在下文中一共展示了Prefix::getInverse方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addNewEP
bool SymmetryObject::addNewEP(int sluten)
{
//cout << "i addfacetobe so is sluten = " << sluten << endl;
//vector<edge>::iterator ite = E_ToBe.end();
int sizE = E.size();
// Fixa:
// Rootera tillbaka ytan så att början
//och slutet alltid rör en rootPoint.
Prefix draBortPfxInv = E_ToBe[0].fr.Pfx;//.getSize();
cout << "The following prefix ska dras away" << endl;
draBortPfxInv.print();
draBortPfxInv = draBortPfxInv.getInverse();
for (unsigned int i=0; i<E_ToBe.size()-1; i++)
{
edge edgeToPushBack;
Prefix enAnnanPrefixIgen = draBortPfxInv;
enAnnanPrefixIgen.rotate(E_ToBe[i].fr.Pfx);
enAnnanPrefixIgen.simplify();
edgeToPushBack.fr.Pfx = enAnnanPrefixIgen;
edgeToPushBack.fr.index = E_ToBe[i].fr.index;
enAnnanPrefixIgen = draBortPfxInv;
enAnnanPrefixIgen.rotate(E_ToBe[i].to.Pfx);
enAnnanPrefixIgen.simplify();
edgeToPushBack.to.Pfx = enAnnanPrefixIgen;
edgeToPushBack.to.index = E_ToBe[i].to.index;
Prefix PfxNext;
Prefix PfxPrev;
switch (sluten) {
case NOT_CENTERED: {
edgeToPushBack.next = Edge(PfxNext, (i==E_ToBe.size()-2? sizE: sizE + i + 1));
edgeToPushBack.prev = Edge(PfxPrev, (i==0? sizE + E_ToBe.size() - 2: sizE + i - 1));
break;
}
case VERTEX_CENTERED: {
if (i==0)
PfxPrev.rotate(VN);
if (i==E_ToBe.size()-2)
PfxNext.rotate(VP);
edgeToPushBack.next = Edge(PfxNext, (i==E_ToBe.size()-2? sizE: sizE + i + 1));
edgeToPushBack.prev = Edge(PfxPrev, i==0? sizE + E_ToBe.size() - 2: sizE + i - 1);
//edgeToPushBack.next = (i==E_ToBe.size()-2? Edge(Pfx, sizE): Edge(Prefix(), sizE + i + 1));
break;
}
case EDGE_CENTERED: {
Prefix cpPrefixHelvete;
cpPrefixHelvete = E_ToBe[E_ToBe.size()-1].fr.Pfx;
cpPrefixHelvete.rotate(draBortPfxInv);
cout << "when it is done, it becomasar: ";
cpPrefixHelvete.print();
cout << endl;
if (i==0) {
PfxPrev = cpPrefixHelvete;
}
if (i==E_ToBe.size()-2) {
PfxNext = cpPrefixHelvete;
}
edgeToPushBack.next = Edge(PfxNext, (i==E_ToBe.size()-2? sizE: sizE + i + 1));
edgeToPushBack.prev = Edge(PfxPrev, (i==0? sizE + E_ToBe.size() - 2: sizE + i - 1));
break;
}
case FACE_CENTERED: {
Prefix PfxNext;
Prefix PfxPrev;
if (i==0)
PfxPrev.rotate(FN);
if (i==E_ToBe.size()-2)
PfxNext.rotate(FP);
edgeToPushBack.next = Edge(PfxNext, (i==E_ToBe.size()-2? sizE: sizE + i + 1));
edgeToPushBack.prev = Edge(PfxPrev, (i==0? sizE + E_ToBe.size() - 2: sizE + i - 1));
break;
}
default:
cout << "symmetryObject.cpp\tHIT SKA DEN INTE KOMMA!!!!!!!!!!!" << endl;
break;
}
// kolla genom om man kan hitta någon opposite
cout << endl;
//int kortastePrefix = 10000000;
edgeToPushBack.oppo.index = -1;
//edgeToPushBack.
//.........这里部分代码省略.........