本文整理汇总了C++中LLNetMap::renderScaledPointGlobal方法的典型用法代码示例。如果您正苦于以下问题:C++ LLNetMap::renderScaledPointGlobal方法的具体用法?C++ LLNetMap::renderScaledPointGlobal怎么用?C++ LLNetMap::renderScaledPointGlobal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLNetMap
的用法示例。
在下文中一共展示了LLNetMap::renderScaledPointGlobal方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: renderObjectsForMap
void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap)
{
LLColor4 above_water_color = gColors.getColor( "NetMapOtherOwnAboveWater" );
LLColor4 below_water_color = gColors.getColor( "NetMapOtherOwnBelowWater" );
LLColor4 you_own_above_water_color =
gColors.getColor( "NetMapYouOwnAboveWater" );
LLColor4 you_own_below_water_color =
gColors.getColor( "NetMapYouOwnBelowWater" );
LLColor4 group_own_above_water_color =
gColors.getColor( "NetMapGroupOwnAboveWater" );
LLColor4 group_own_below_water_color =
gColors.getColor( "NetMapGroupOwnBelowWater" );
for (S32 i = 0; i < mMapObjects.count(); i++)
{
LLViewerObject* objectp = mMapObjects[i];
if (!objectp->getRegion() || objectp->isOrphaned() || objectp->isAttachment())
{
continue;
}
const LLVector3& scale = objectp->getScale();
const LLVector3d pos = objectp->getPositionGlobal();
const F64 water_height = F64( objectp->getRegion()->getWaterHeight() );
// LLWorld::getInstance()->getWaterHeight();
F32 approx_radius = (scale.mV[VX] + scale.mV[VY]) * 0.5f * 0.5f * 1.3f; // 1.3 is a fudge
LLColor4U color = above_water_color;
if( objectp->permYouOwner() )
{
const F32 MIN_RADIUS_FOR_OWNED_OBJECTS = 2.f;
if( approx_radius < MIN_RADIUS_FOR_OWNED_OBJECTS )
{
approx_radius = MIN_RADIUS_FOR_OWNED_OBJECTS;
}
if( pos.mdV[VZ] >= water_height )
{
if ( objectp->permGroupOwner() )
{
color = group_own_above_water_color;
}
else
{
color = you_own_above_water_color;
}
}
else
{
if ( objectp->permGroupOwner() )
{
color = group_own_below_water_color;
}
else
{
color = you_own_below_water_color;
}
}
}
else
if( pos.mdV[VZ] < water_height )
{
color = below_water_color;
}
netmap.renderScaledPointGlobal(
pos,
color,
approx_radius );
}
}
示例2: renderObjectsForMap
void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap)
{
LLColor4 above_water_color = gColors.getColor( "NetMapOtherOwnAboveWater" );
LLColor4 below_water_color = gColors.getColor( "NetMapOtherOwnBelowWater" );
LLColor4 you_own_above_water_color =
gColors.getColor( "NetMapYouOwnAboveWater" );
LLColor4 you_own_below_water_color =
gColors.getColor( "NetMapYouOwnBelowWater" );
LLColor4 group_own_above_water_color =
gColors.getColor( "NetMapGroupOwnAboveWater" );
LLColor4 group_own_below_water_color =
gColors.getColor( "NetMapGroupOwnBelowWater" );
F32 max_radius = gSavedSettings.getF32("MiniMapPrimMaxRadius");
for (S32 i = 0; i < mMapObjects.count(); i++)
{
LLViewerObject* objectp = mMapObjects[i];
if (!objectp->getRegion() || objectp->isOrphaned() || objectp->isAttachment())
{
continue;
}
const LLVector3& scale = objectp->getScale();
const LLVector3d pos = objectp->getPositionGlobal();
const F64 water_height = F64( objectp->getRegion()->getWaterHeight() );
// LLWorld::getInstance()->getWaterHeight();
F32 approx_radius = (scale.mV[VX] + scale.mV[VY]) * 0.5f * 0.5f * 1.3f; // 1.3 is a fudge
// Limit the size of megaprims so they don't blot out everything on the minimap.
// Attempting to draw very large megaprims also causes client lag.
// See DEV-17370 and SNOW-79 for details.
approx_radius = llmin(approx_radius, max_radius);
LLColor4U color = above_water_color;
if( objectp->permYouOwner() )
{
const F32 MIN_RADIUS_FOR_OWNED_OBJECTS = 2.f;
if( approx_radius < MIN_RADIUS_FOR_OWNED_OBJECTS )
{
approx_radius = MIN_RADIUS_FOR_OWNED_OBJECTS;
}
if( pos.mdV[VZ] >= water_height )
{
if ( objectp->permGroupOwner() )
{
color = group_own_above_water_color;
}
else
{
color = you_own_above_water_color;
}
}
else
{
if ( objectp->permGroupOwner() )
{
color = group_own_below_water_color;
}
else
{
color = you_own_below_water_color;
}
}
}
else
if( pos.mdV[VZ] < water_height )
{
color = below_water_color;
}
netmap.renderScaledPointGlobal(
pos,
color,
approx_radius );
}
}