本文整理汇总了C++中LLLandmark::getRegionID方法的典型用法代码示例。如果您正苦于以下问题:C++ LLLandmark::getRegionID方法的具体用法?C++ LLLandmark::getRegionID怎么用?C++ LLLandmark::getRegionID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLLandmark
的用法示例。
在下文中一共展示了LLLandmark::getRegionID方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: processGetAssetReply
// static
void LLLandmarkList::processGetAssetReply(
LLVFS *vfs,
const LLUUID& uuid,
LLAssetType::EType type,
void* user_data,
S32 status)
{
if( status == 0 )
{
LLVFile file(vfs, uuid, type);
S32 file_length = file.getSize();
char* buffer = new char[ file_length + 1 ];
file.read( (U8*)buffer, file_length); /*Flawfinder: ignore*/
buffer[ file_length ] = 0;
LLLandmark* landmark = LLLandmark::constructFromString(buffer);
if (landmark)
{
LLVector3d pos;
if(!landmark->getGlobalPos(pos))
{
LLUUID region_id;
if(landmark->getRegionID(region_id))
{
LLLandmark::requestRegionHandle(
gMessageSystem,
gAgent.getRegionHost(),
region_id,
NULL);
}
}
gLandmarkList.mList[ uuid ] = landmark;
}
delete[] buffer;
}
else
{
if( gViewerStats )
{
gViewerStats->incStat( LLViewerStats::ST_DOWNLOAD_FAILED );
}
if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status )
{
LLNotifyBox::showXml("LandmarkMissing");
}
else
{
LLNotifyBox::showXml("UnableToLoadLandmark");
}
gLandmarkList.mBadList.insert(uuid);
}
}
示例2: processGetAssetReply
// static
void LLLandmarkList::processGetAssetReply(
LLVFS *vfs,
const LLUUID& uuid,
LLAssetType::EType type,
void* user_data,
S32 status,
LLExtStat ext_status )
{
if( status == 0 )
{
LLVFile file(vfs, uuid, type);
S32 file_length = file.getSize();
std::vector<char> buffer(file_length + 1);
file.read( (U8*)&buffer[0], file_length);
buffer[ file_length ] = 0;
LLLandmark* landmark = LLLandmark::constructFromString(&buffer[0]);
if (landmark)
{
gLandmarkList.mList[ uuid ] = landmark;
gLandmarkList.mRequestedList.erase(uuid);
LLVector3d pos;
if(!landmark->getGlobalPos(pos))
{
LLUUID region_id;
if(landmark->getRegionID(region_id))
{
LLLandmark::requestRegionHandle(
gMessageSystem,
gAgent.getRegionHost(),
region_id,
boost::bind(&LLLandmarkList::onRegionHandle, &gLandmarkList, uuid));
}
// the callback will be called when we get the region handle.
}
else
{
gLandmarkList.makeCallbacks(uuid);
}
}
}
else
{
LLViewerStats::getInstance()->incStat( LLViewerStats::ST_DOWNLOAD_FAILED );
if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status )
{
LLNotificationsUtil::add("LandmarkMissing");
}
else
{
LLNotificationsUtil::add("UnableToLoadLandmark");
}
gLandmarkList.mBadList.insert(uuid);
}
}