本文整理汇总了C++中LLSimInfo::isDown方法的典型用法代码示例。如果您正苦于以下问题:C++ LLSimInfo::isDown方法的具体用法?C++ LLSimInfo::isDown怎么用?C++ LLSimInfo::isDown使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLSimInfo
的用法示例。
在下文中一共展示了LLSimInfo::isDown方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: insertRegion
// static public
// Insert a region in the region map
// returns true if region inserted, false otherwise
bool LLWorldMap::insertRegion(U32 x_world, U32 y_world, U32 x_size, U32 y_size, U32 agent_flags, std::string& name, LLUUID& image_id, U32 accesscode, U32 region_flags)
{
// This region doesn't exist
if (accesscode == 255)
{
// Checks if the track point is in it and invalidates it if it is
if (LLWorldMap::getInstance()->isTrackingInRectangle( x_world, y_world, x_world + REGION_WIDTH_UNITS, y_world + REGION_WIDTH_UNITS))
{
LLWorldMap::getInstance()->setTrackingInvalid();
}
// return failure to insert
return false;
}
else
{
U64 handle = to_region_handle(x_world, y_world);
//LL_INFOS("World Map") << "Map sim : " << name << ", ID : " << image_id.getString() << LL_ENDL;
// Insert the region in the region map of the world map
// Loading the LLSimInfo object with what we got and insert it in the map
LLSimInfo* siminfo = LLWorldMap::getInstance()->simInfoFromHandle(handle);
if (siminfo == NULL)
{
siminfo = LLWorldMap::getInstance()->createSimInfoFromHandle(handle);
}
siminfo->setName( name );
siminfo->setAccess( accesscode );
siminfo->setRegionFlags( region_flags );
//siminfo->setWaterHeight((F32) water_height);
U32 layer = flagsToLayer(agent_flags);
if (layer == SIM_LAYER_OVERLAY)
siminfo->setLandForSaleImage(image_id);
else if(layer < SIM_LAYER_COUNT)
siminfo->setMapImageID( image_id, layer );
siminfo->setSize( x_size, y_size );
// Handle the location tracking (for teleport, UI feedback and info display)
if (LLWorldMap::getInstance()->isTrackingInRectangle( x_world, y_world, x_world + REGION_WIDTH_UNITS, y_world + REGION_WIDTH_UNITS))
{
if (siminfo->isDown())
{
// We were tracking this location, but it's no available
LLWorldMap::getInstance()->setTrackingInvalid();
}
else
{
// We were tracking this location, and it does exist and is available
LLWorldMap::getInstance()->setTrackingValid();
}
}
// return insert region success
return true;
}
}
示例2: processMapBlockReply
//.........这里部分代码省略.........
found_null_sim = true;
}
else
{
adjust = LLWorldMap::getInstance()->extendAABB(x_meters,
y_meters,
x_meters+REGION_WIDTH_UNITS,
y_meters+REGION_WIDTH_UNITS) || adjust;
//LL_INFOS("World Map") << "Map sim : " << name << ", ID : " << image_id.getString() << LL_ENDL;
// Insert the region in the region map of the world map
// Loading the LLSimInfo object with what we got and insert it in the map
LLSimInfo* siminfo = LLWorldMap::getInstance()->simInfoFromHandle(handle);
if (siminfo == NULL)
{
siminfo = LLWorldMap::getInstance()->createSimInfoFromHandle(handle);
}
siminfo->setName( name );
siminfo->setAccess( accesscode );
siminfo->setRegionFlags( region_flags );
siminfo->setWaterHeight((F32) water_height);
siminfo->setMapImageID( image_id, agent_flags );
siminfo->setSize( x_size, y_size );
#ifdef IMMEDIATE_IMAGE_LOAD
if (use_web_map_tiles)
{
siminfo->mCurrentImage = loadObjectsTile((U32)x_regions, (U32)y_regions);
}
else
{
siminfo->mCurrentImage = LLViewerTextureManager::getFetchedTexture(siminfo->mMapImageID[LLWorldMap::getInstance()->mCurrentMap], MIPMAP_TRUE, FALSE);
}
gGL.getTexUnit(0)->bind(siminfo->mCurrentImage.get());
siminfo->mCurrentImage->setAddressMode(LLTexUnit::TAM_CLAMP);
#endif
if (siminfo->mMapImageID[2].notNull())
{
#ifdef IMMEDIATE_IMAGE_LOAD
siminfo->mOverlayImage = LLViewerTextureManager::getFetchedTextureURL(siminfo->mMapImageID[2]);
#endif
}
else
{
siminfo->mOverlayImage = NULL;
}
if (LLWorldMap::getInstance()->mIsTrackingUnknownLocation &&
LLWorldMap::getInstance()->mUnknownLocation.mdV[0] >= x_meters &&
LLWorldMap::getInstance()->mUnknownLocation.mdV[0] < x_meters + 256 &&
LLWorldMap::getInstance()->mUnknownLocation.mdV[1] >= y_meters &&
LLWorldMap::getInstance()->mUnknownLocation.mdV[1] < y_meters + 256)
{
if (siminfo->isDown())
{
// We were tracking this location, but it doesn't exist
LLWorldMap::getInstance()->mInvalidLocation = true;
}
else
{
// We were tracking this location, and it does exist
bool is_tracking_dbl = LLWorldMap::getInstance()->mIsTrackingDoubleClick == TRUE;
gFloaterWorldMap->trackLocation(LLWorldMap::getInstance()->mUnknownLocation);
if (is_tracking_dbl)
{
LLVector3d pos_global = LLTracker::getTrackedPositionGlobal();
gAgent.teleportViaLocation( pos_global );
}
}
}
}
if(LLWorldMap::getInstance()->mSLURLCallback != NULL)
{
// Server returns definitive capitalization, SLURL might not have that.
if ((LLStringUtil::compareInsensitive(LLWorldMap::getInstance()->mSLURLRegionName, name)==0)
|| (LLWorldMap::getInstance()->mSLURLRegionHandle == handle))
{
url_callback_t callback = LLWorldMap::getInstance()->mSLURLCallback;
LLWorldMap::getInstance()->mSLURLCallback = NULL;
LLWorldMap::getInstance()->mSLURLRegionName.clear();
LLWorldMap::getInstance()->mSLURLRegionHandle = 0;
callback(handle, LLWorldMap::getInstance()->mSLURL, image_id, LLWorldMap::getInstance()->mSLURLTeleport);
}
}
if( gAgent.mPendingLure &&
(U16)(gAgent.mPendingLure->mPosGlobal.mdV[0] / REGION_WIDTH_UNITS) == x_regions &&
(U16)(gAgent.mPendingLure->mPosGlobal.mdV[1] / REGION_WIDTH_UNITS) == y_regions )
{
gAgent.onFoundLureDestination();
}
}
if(adjust) gFloaterWorldMap->adjustZoomSliderBounds();
gFloaterWorldMap->updateSims(found_null_sim);
}