本文整理汇总了C++中CBrush::planesEnd方法的典型用法代码示例。如果您正苦于以下问题:C++ CBrush::planesEnd方法的具体用法?C++ CBrush::planesEnd怎么用?C++ CBrush::planesEnd使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBrush
的用法示例。
在下文中一共展示了CBrush::planesEnd方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: forceDetailBrushes
void CFilterer::forceDetailBrushes()
{
list<CBrushPlane>::iterator pIter, pEnd;
bool forceItDetail;
CBrush *brush;
int brushesMadeDetail = 0;
for(int i=0;i<worldEntity->getBrushesNo();i++) {
brush = &worldEntity->getBrush(i);
if(!brush->isStructural())
continue;
forceItDetail = true;
pIter = brush->planesBegin();
pEnd = brush->planesEnd();
while(pIter!=pEnd){
if(!pIter->canBeDetail()){
forceItDetail = false;
break;
}
++pIter;
}
if(forceItDetail){
brush->setStructural(false);
brushesMadeDetail++;
}
}
cout << brushesMadeDetail<<" forced detail"<<endl;
}
示例2: mergeDetails
void CFilterer::mergeDetails(CBTree<CBspNode *>::Node *node){
if(!node->isLeaf()) {
mergeDetails(node->child(0));
mergeDetails(node->child(1));
return;
}
//NOW LEAF
CBspLeaf *leaf = (CBspLeaf *)node->data;
if(!leaf->getArea())
return;
vector<CBrush *>::iterator i, e;
list < CBrushPlane >::iterator dpi, dpe;
CPolygon *detailP, structuralP;
e=leaf->bEnd();
CBrush *db;//detail part brush
//VertsVector::iterator v, ve;
vector<CBrush *> allNb; //these are these and neigbor brushes
vector<CBspLeaf *>::iterator li, le;
vector<CBrush *>::iterator brushI, brushE;
li=leaf->oLeafsBegin();
le=leaf->oLeafsEnd();
while(li!=le){
(*li)->appendYourBrushes(allNb, worldEntity);
li++;
}
leaf->appendYourBrushes(allNb, worldEntity);
brushE = allNb.end();
bool isAllInBrush;
// this holds brushes which contains at least one vertex of a poly
// but not all vertices
list<CBrush *> brushesIn;
list<CPolygon *>::iterator pi, pe;
pi=leaf->polygonsBegin();
pe=leaf->polygonsEnd();
while(pi!=pe){
if(!(*pi)->isKeep() || (*pi)->isLeak()){
++pi;
continue;
}
for(brushI=allNb.begin(); brushI!=brushE;++brushI){
assert((*brushI)->getBrushId()!=-1);
assert((*pi)->getBrushId()!=-1);
/*
if((*brushI)->getBrushId() == (*i)->getBrushId())//if is the brush of this polygon do nothing
continue;
*/
if((*brushI)->getBrushId() == (*pi)->getBrushId())
continue;
if((*brushI)->isOpaque()){
if((*brushI)->subPolygon(*pi)){
leaf->erasePolygon(pi);
break;
}
}
}
++pi;
}
for(i=leaf->bBegin();i!=e;++i){
brushesIn.clear();
db = *i;
dpi = db->planesBegin();
dpe = db->planesEnd();
for( ; dpi != dpe ; ++dpi ){
detailP = dpi->getPolygon();
if(!detailP->isKeep())
continue;
isAllInBrush=false;
for(brushI=allNb.begin(); brushI!=brushE;++brushI){
assert((*brushI)->getBrushId()!=-1);
assert((*i)->getBrushId()!=-1);
if((*brushI)->getBrushId() == (*i)->getBrushId())//if is the brush of this polygon do nothing
continue;
if((*brushI)->isOpaque()){
isAllInBrush = (*brushI)->subPolygon(detailP);
if(isAllInBrush)
break;
}
}
if(isAllInBrush)
continue;
detailP->merge();
}
}
}