本文整理汇总了C++中POVMS_Object::GetInt方法的典型用法代码示例。如果您正苦于以下问题:C++ POVMS_Object::GetInt方法的具体用法?C++ POVMS_Object::GetInt怎么用?C++ POVMS_Object::GetInt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类POVMS_Object
的用法示例。
在下文中一共展示了POVMS_Object::GetInt方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Progress
void RenderMessageHandler::Progress(Console *console, POVMS_Object& obj, bool verbose)
{
ostringstream sstr;
switch(obj.GetType(kPOVMSObjectClassID))
{
case kPOVObjectClass_PhotonProgress:
{
int cpc(obj.GetInt(kPOVAttrib_CurrentPhotonCount));
sstr << Message2Console::GetProgressTime(obj, kPOVAttrib_RealTime)
<< " Photons " << cpc << " \r";
break;
}
case kPOVObjectClass_RadiosityProgress:
{
int pt(obj.GetInt(kPOVAttrib_Pixels));
int pc(obj.GetInt(kPOVAttrib_PixelsCompleted));
int percent = 0;
if(pt > 0)
percent = (pc * 100) / pt;
sstr << Message2Console::GetProgressTime(obj, kPOVAttrib_RealTime)
<< " Radiosity pretrace completed " << pc << " of " << pt << " pixels (" << percent << "%) \r";
break;
}
case kPOVObjectClass_RenderProgress:
{
int pt(obj.GetInt(kPOVAttrib_Pixels));
int pp(obj.GetInt(kPOVAttrib_PixelsPending));
int pc(obj.GetInt(kPOVAttrib_PixelsCompleted));
int percent = 0;
if(pt > 0)
percent = (pc * 100) / pt;
sstr << Message2Console::GetProgressTime(obj, kPOVAttrib_RealTime)
<< "Rendering completed " << pc << " of " << pt << " pixels (" << percent << "%) and " << pp << " pixels pending \r";
break;
}
}
console->Output(sstr.str());
}