本文整理汇总了C++中LLLandmark::getGlobalPos方法的典型用法代码示例。如果您正苦于以下问题:C++ LLLandmark::getGlobalPos方法的具体用法?C++ LLLandmark::getGlobalPos怎么用?C++ LLLandmark::getGlobalPos使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLLandmark
的用法示例。
在下文中一共展示了LLLandmark::getGlobalPos方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: teleportToLandmark
void LLFloaterWorldMap::teleportToLandmark()
{
BOOL has_destination = FALSE;
LLUUID destination_id; // Null means "home"
if (LLTracker::getTrackedLandmarkAssetID() == sHomeID)
{
has_destination = TRUE;
}
else
{
LLLandmark* landmark = gLandmarkList.getAsset(LLTracker::getTrackedLandmarkAssetID());
LLVector3d global_pos;
if (landmark && landmark->getGlobalPos(global_pos))
{
destination_id = LLTracker::getTrackedLandmarkAssetID();
has_destination = TRUE;
}
else if (landmark)
{
// pop up an anonymous request request.
LLUUID region_id;
if (landmark->getRegionID(region_id))
{
LLLandmark::requestRegionHandle(
gMessageSystem,
gAgent.getRegionHost(),
region_id,
NULL);
}
}
}
if (has_destination)
{
gAgent.teleportViaLandmark(destination_id);
}
}
示例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);
}
}