本文整理汇总了C++中idBrushList::Head方法的典型用法代码示例。如果您正苦于以下问题:C++ idBrushList::Head方法的具体用法?C++ idBrushList::Head怎么用?C++ idBrushList::Head使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类idBrushList
的用法示例。
在下文中一共展示了idBrushList::Head方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ClipBrushSidesWithProcBSP
/*
============
idAASBuild::ClipBrushSidesWithProcBSP
============
*/
void idAASBuild::ClipBrushSidesWithProcBSP( idBrushList &brushList ) {
int i, clippedSides;
idBrush *brush;
idFixedWinding neww;
idBounds bounds;
float radius;
idVec3 origin;
// if the .proc file has no BSP tree
if( idAASBuild::procNodes == NULL ) {
return;
}
clippedSides = 0;
for( brush = brushList.Head(); brush; brush = brush->Next() ) {
for( i = 0; i < brush->GetNumSides(); i++ ) {
if( !brush->GetSide( i )->GetWinding() ) {
continue;
}
// make a local copy of the winding
neww = *brush->GetSide( i )->GetWinding();
neww.GetBounds( bounds );
origin = ( bounds[1] - bounds[0] ) * 0.5f;
radius = origin.Length() + ON_EPSILON;
origin = bounds[0] + origin;
if( ChoppedAwayByProcBSP( 0, &neww, brush->GetSide( i )->GetPlane().Normal(), origin, radius ) ) {
brush->GetSide( i )->SetFlag( SFL_USED_SPLITTER );
clippedSides++;
}
}
}
common->Printf( "%6d brush sides clipped\n", clippedSides );
}
示例2: WriteBrushList
/*
============
idBrushMap::WriteBrushList
============
*/
void idBrushMap::WriteBrushList( const idBrushList& brushList )
{
idBrush* b;
if( !fp )
{
return;
}
for( b = brushList.Head(); b; b = b->Next() )
{
WriteBrush( b );
}
}