本文整理汇总了C++中S1::size方法的典型用法代码示例。如果您正苦于以下问题:C++ S1::size方法的具体用法?C++ S1::size怎么用?C++ S1::size使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类S1
的用法示例。
在下文中一共展示了S1::size方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DrawFibre
void fsvtkToolpathMapper::DrawFibre(S1& fib, I1& wrg, double z)
{
glBegin(GL_LINE_STRIP);
for (int i = 0; i < fib.size(); i++)
{
if ((i % 2) == 0)
{
glEnd();
glBegin(GL_LINE_STRIP);
}
//P2 p = ((fib.value_type == 1) ? P2(fib[i].w, fib.wp) : P2(fib.wp, fib[i].w));
P2 p = ((fib.ftype == 2) ? P2(fib[i].w, fib.wp) : P2(fib.wp, fib[i].w));
glVertex3d(p.u, p.v, z);
}
glEnd();
}
示例2: AddBoundListMatches
//////////////////////////////////////////////////////////////////////
// we have some const_casts here so we can get at the
bool AddBoundListMatches(vector< pair<int, B1*> >& boundlist, const S1& fw, const I1& rg, int edgno, bool bGoingDown, bool bStartIn)
{
ASSERT(((edgno & 2) != 0) == bGoingDown);
pair<int, int> ilr = fw.Loclohi(rg);
// pull-back from any boundaries that just cross.
if ((ilr.first <= ilr.second) && fw[ilr.first].blower && (fw[ilr.first].w == rg.lo))
ilr.first++;
if ((ilr.first <= ilr.second) && !fw[ilr.second].blower && (fw[ilr.second].w == rg.hi))
ilr.second--;
// deal with the inside/outside info
ASSERT(fw.empty() || fw.front().blower);
ASSERT(fw.empty() || !fw.back().blower);
bool bLeftIn = (ilr.first == 0 ? false : fw[ilr.first - 1].blower);
bool bRightIn = (ilr.second == (int)(fw.size()) - 1 ? false : !fw[ilr.second + 1].blower);
ASSERT(bStartIn == (bGoingDown ? bRightIn : bLeftIn));
bool bEndIn = (bGoingDown ? bLeftIn : bRightIn);
// feed in the indexes of the entries
if (!bGoingDown)
{
for (int i = ilr.first; i <= ilr.second; i++)
{
boundlist.push_back(pair<int, B1*>(edgno, const_cast<B1*>(&(fw[i]))));
ASSERT(rg.Contains(fw[i].w));
}
}
else
{
for (int i = ilr.second; i >= ilr.first; i--)
{
boundlist.push_back(pair<int, B1*>(edgno, const_cast<B1*>(&(fw[i]))));
ASSERT(rg.Contains(fw[i].w));
}
}
return bEndIn;
}