本文整理汇总了C++中LLViewerRegion::getRenderInfoRequestTimer方法的典型用法代码示例。如果您正苦于以下问题:C++ LLViewerRegion::getRenderInfoRequestTimer方法的具体用法?C++ LLViewerRegion::getRenderInfoRequestTimer怎么用?C++ LLViewerRegion::getRenderInfoRequestTimer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLViewerRegion
的用法示例。
在下文中一共展示了LLViewerRegion::getRenderInfoRequestTimer方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: expireRenderInfoReportTimer
// static
// Make sRenderInfoReportTimer expire so the next call to idle() will scan and query a new region
// called via LLViewerRegion::setCapabilitiesReceived() boost signals when the capabilities
// are returned for a new LLViewerRegion, and is the earliest time to get render info
void LLAvatarRenderInfoAccountant::expireRenderInfoReportTimer(const LLUUID& region_id)
{
if (logRenderInfo())
{
LL_INFOS() << "LRI: Viewer has new region capabilities, clearing global render info timer"
<< " and timer for region " << region_id
<< LL_ENDL;
}
// Reset the global timer so it will scan regions immediately
sRenderInfoReportTimer.reset();
LLViewerRegion* regionp = LLWorld::instance().getRegionFromID(region_id);
if (regionp)
{ // Reset the region's timer so it will request data immediately
regionp->getRenderInfoRequestTimer().reset();
}
}
示例2: idle
// static
// Called every frame - send render weight requests to every region
void LLAvatarRenderInfoAccountant::idle()
{
if (sRenderInfoReportTimer.hasExpired())
{
const F32 SECS_BETWEEN_REGION_SCANS = 5.f; // Scan the region list every 5 seconds
const F32 SECS_BETWEEN_REGION_REQUEST = 60.0; // Update each region every 60 seconds
S32 num_avs = LLCharacter::sInstances.size();
if (logRenderInfo())
{
LL_INFOS() << "LRI: Scanning all regions and checking for render info updates"
<< LL_ENDL;
}
// Check all regions and see if it's time to fetch/send data
for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
{
LLViewerRegion* regionp = *iter;
if (regionp &&
regionp->isAlive() &&
regionp->capabilitiesReceived() && // Region has capability URLs available
regionp->getRenderInfoRequestTimer().hasExpired()) // Time to make request
{
sendRenderInfoToRegion(regionp);
getRenderInfoFromRegion(regionp);
// Reset this regions timer, moving to longer intervals if there are lots of avatars around
regionp->getRenderInfoRequestTimer().resetWithExpiry(SECS_BETWEEN_REGION_REQUEST + (2.f * num_avs));
}
}
// We scanned all the regions, reset the request timer.
sRenderInfoReportTimer.resetWithExpiry(SECS_BETWEEN_REGION_SCANS);
}
/* Singu TODO: RenderAutoMuteFunctions
static LLCachedControl<U32> render_auto_mute_functions(gSavedSettings, "RenderAutoMuteFunctions", 0);
static U32 prev_render_auto_mute_functions = (U32) -1;
if (prev_render_auto_mute_functions != render_auto_mute_functions)
{
prev_render_auto_mute_functions = render_auto_mute_functions;
// Adjust menus
BOOL show_items = (BOOL)(render_auto_mute_functions & 0x04);
gMenuAvatarOther->setItemVisible( std::string("Normal"), show_items);
gMenuAvatarOther->setItemVisible( std::string("Always use impostor"), show_items);
gMenuAvatarOther->setItemVisible( std::string("Never use impostor"), show_items);
gMenuAvatarOther->setItemVisible( std::string("Impostor seperator"), show_items);
gMenuAttachmentOther->setItemVisible( std::string("Normal"), show_items);
gMenuAttachmentOther->setItemVisible( std::string("Always use impostor"), show_items);
gMenuAttachmentOther->setItemVisible( std::string("Never use impostor"), show_items);
gMenuAttachmentOther->setItemVisible( std::string("Impostor seperator"), show_items);
if (!show_items)
{ // Turning off visual muting
for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
iter != LLCharacter::sInstances.end(); ++iter)
{ // Make sure all AVs have the setting cleared
LLVOAvatar* inst = (LLVOAvatar*) *iter;
inst->setCachedVisualMute(false);
}
}
}*/
}