本文整理汇总了C++中xr_vector::empty方法的典型用法代码示例。如果您正苦于以下问题:C++ xr_vector::empty方法的具体用法?C++ xr_vector::empty怎么用?C++ xr_vector::empty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类xr_vector
的用法示例。
在下文中一共展示了xr_vector::empty方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: float
virtual void Execute()
{
CDeflector* D = 0;
for (;;)
{
// Get task
task_CS.Enter ();
thProgress = 1.f - float(task_pool.size())/float(g_deflectors.size());
if (task_pool.empty())
{
task_CS.Leave ();
return;
}
D = g_deflectors[task_pool.back()];
task_pool.pop_back ();
task_CS.Leave ();
// Perform operation
try {
D->Light (&DB,&LightsSelected,H);
} catch (...)
{
clMsg("* ERROR: CLMThread::Execute - light");
}
}
}
示例2:
void CRestrictedObject::remove_restrictions (const xr_vector<ALife::_OBJECT_ID> &out_restrictions, const xr_vector<ALife::_OBJECT_ID> &in_restrictions)
{
if (out_restrictions.empty() && in_restrictions.empty())
return;
START_PROFILE("Restricted Object/Remove Restrictions");
string4096 temp_out_restrictions;
string4096 temp_in_restrictions;
construct_restriction_string<CRestrictionPredicate<false>,false>(temp_out_restrictions,sizeof(temp_out_restrictions),out_restrictions,this->out_restrictions(),CRestrictionPredicate<false>(RestrictionSpace::eRestrictorTypeOut));
construct_restriction_string<CRestrictionPredicate<false>,false>(temp_in_restrictions,sizeof(temp_in_restrictions),in_restrictions,this->in_restrictions(),CRestrictionPredicate<false>(RestrictionSpace::eRestrictorTypeIn));
Level().space_restriction_manager().remove_restrictions (object().ID(),temp_out_restrictions,temp_in_restrictions);
actual (false);
STOP_PROFILE;
}
示例3:
void OGF::adjacent_select (xr_vector<u32>& dest, xr_vector<bool>& vmark, xr_vector<bool>& fmark)
{
// 0. Search for the group
for (u32 fit=0; fit<faces.size(); fit++) {
OGF_Face& F = faces [fit];
if (fmark[fit]) continue; // already registered
// new face - if empty - just put it in, else check connectivity
if (dest.empty()) {
fmark[fit] = true ;
dest.push_back (F.v[0]); vmark[F.v[0]]=true;
dest.push_back (F.v[1]); vmark[F.v[1]]=true;
dest.push_back (F.v[2]); vmark[F.v[2]]=true;
} else {
// check connectivity
BOOL bConnected = FALSE;
for (u32 vid=0; vid<3; vid++) {
u32 id = F.v [vid]; // search in already registered verts
for (u32 sid=0; sid<dest.size(); sid++)
{
if (id==dest[sid]) {
bConnected = TRUE; // this face shares at least one vertex with already selected faces
break;
}
}
if (bConnected) break;
}
if (bConnected) {
// add this face's vertices
fmark[fit] = true ;
if (!vmark[F.v[0]]) { dest.push_back (F.v[0]); vmark[F.v[0]]=true; }
if (!vmark[F.v[1]]) { dest.push_back (F.v[1]); vmark[F.v[1]]=true; }
if (!vmark[F.v[2]]) { dest.push_back (F.v[2]); vmark[F.v[2]]=true; }
}
}
}
}