本文整理汇总了C++中LLViewerImage::getID方法的典型用法代码示例。如果您正苦于以下问题:C++ LLViewerImage::getID方法的具体用法?C++ LLViewerImage::getID怎么用?C++ LLViewerImage::getID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLViewerImage
的用法示例。
在下文中一共展示了LLViewerImage::getID方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: bindBumpMap
// static
BOOL LLDrawPoolBump::bindBumpMap(LLDrawInfo& params, S32 channel)
{
LLImageGL* bump = NULL;
U8 bump_code = params.mBump;
LLViewerImage* tex = params.mTexture;
switch( bump_code )
{
case BE_NO_BUMP:
bump = NULL;
break;
case BE_BRIGHTNESS:
case BE_DARKNESS:
if( tex )
{
if(tex->getID()== IMG_DEFAULT)
{
return TRUE;
}
bump = gBumpImageList.getBrightnessDarknessImage( tex, bump_code );
}
break;
default:
if( bump_code < LLStandardBumpmap::sStandardBumpmapCount )
{
bump = gStandardBumpmapList[bump_code].mImage;
gBumpImageList.addTextureStats(bump_code, tex->getID(), params.mVSize);
}
break;
}
if (bump)
{
if (channel == -2)
{
gGL.getTexUnit(1)->bind(bump);
gGL.getTexUnit(0)->bind(bump);
}
else
{
gGL.getTexUnit(channel)->bind(bump);
}
return TRUE;
}
return FALSE;
}
示例2: shutdown
void LLViewerImageList::shutdown()
{
// clear out preloads
mImagePreloads.clear();
// Write out list of currently loaded textures for precaching on startup
typedef std::set<std::pair<S32,LLViewerImage*> > image_area_list_t;
image_area_list_t image_area_list;
for (image_priority_list_t::iterator iter = mImageList.begin();
iter != mImageList.end(); ++iter)
{
LLViewerImage* image = *iter;
if (!image->getUseDiscard() ||
image->needsAux() ||
image->getTargetHost() != LLHost::invalid)
{
continue; // avoid UI, baked, and other special images
}
S32 desired = image->getDesiredDiscardLevel();
if (desired >= 0 && desired < MAX_DISCARD_LEVEL)
{
S32 pixel_area = image->getWidth(desired) * image->getHeight(desired);
image_area_list.insert(std::make_pair(pixel_area, image));
}
}
LLSD imagelist;
const S32 max_count = 1000;
S32 count = 0;
for (image_area_list_t::reverse_iterator riter = image_area_list.rbegin();
riter != image_area_list.rend(); ++riter)
{
LLViewerImage* image = riter->second;
imagelist[count]["area"] = riter->first;
imagelist[count]["uuid"] = image->getID();
if (++count >= max_count)
break;
}
if (count > 0 && !gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "").empty())
{
std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, get_texture_list_name());
llofstream file;
file.open(filename);
LLSDSerialize::toPrettyXML(imagelist, file);
}
//
// Clean up "loaded" callbacks.
//
mCallbackList.clear();
// Flush all of the references
mLoadingStreamList.clear();
mCreateTextureList.clear();
mUUIDMap.clear();
mImageList.clear();
}
示例3: getImageUUID
LLUUID LLViewerPartSource::getImageUUID() const
{
LLViewerImage* imagep = mImagep;
if(imagep)
{
return imagep->getID();
}
return LLUUID::null;
}
示例4: readFromAvatar
// Updates asset from the user's avatar
void LLWearable::readFromAvatar()
{
LLVOAvatar* avatar = gAgent.getAvatarObject();
llassert( avatar );
if( !avatar )
{
return;
}
mDefinitionVersion = LLWearable::sCurrentDefinitionVersion;
mVisualParamMap.clear();
for( LLVisualParam* param = avatar->getFirstVisualParam(); param; param = avatar->getNextVisualParam() )
{
if (((LLViewerVisualParam*)param)->getWearableType() == mType && param->isTweakable())
{
//pretty sure is right
if(param->getID() == 507)
avatar->setActualBoobGrav(param->getWeight());
if(param->getID() == 151)
avatar->setActualButtGrav(param->getWeight());
if(param->getID() == 157)
avatar->setActualFatGrav(param->getWeight());
//if(param->getID() == 507)
//{
// llwarns << "current = " << avatar->getActualBoobGrav() << llendl;
// llwarns << "param weight = " << param->getWeight() << llendl;
//}
mVisualParamMap[param->getID()] = param->getWeight();
}
}
mTEMap.clear();
for( S32 te = 0; te < TEX_NUM_INDICES; te++ )
{
if( LLVOAvatar::getTEWearableType((ETextureIndex) te ) == mType )
{
LLViewerImage* image = avatar->getTEImage( te );
if( image )
{
mTEMap[te] = image->getID();
}
}
}
//if( gFloaterCustomize )
//{
// mDescription = gFloaterCustomize->getWearableDescription( mType );
//}
}
示例5: dump
void LLViewerImageList::dump()
{
llinfos << "LLViewerImageList::dump()" << llendl;
for (image_priority_list_t::iterator it = mImageList.begin(); it != mImageList.end(); ++it)
{
LLViewerImage* image = *it;
llinfos << "priority " << image->getDecodePriority()
<< " boost " << image->getBoostLevel()
<< " size " << image->getWidth() << "x" << image->getHeight()
<< " discard " << image->getDiscardLevel()
<< " desired " << image->getDesiredDiscardLevel()
<< " http://asset.siva.lindenlab.com/" << image->getID() << ".texture"
<< llendl;
}
}
示例6: handleMouseDown
BOOL LLToolTexEyedropper::handleMouseDown(S32 x, S32 y, MASK mask)
{
// this will affect framerate on mouse down
const LLPickInfo& pick = gViewerWindow->pickImmediate(x, y, FALSE);
LLViewerObject* hit_obj = pick.getObject();
if (hit_obj &&
!hit_obj->isAvatar())
{
if( (0 <= pick.mObjectFace) && (pick.mObjectFace < hit_obj->getNumTEs()) )
{
LLViewerImage* image = hit_obj->getTEImage( pick.mObjectFace );
if( image )
{
if( mCallback )
{
mCallback( hit_obj->getID(), image->getID(), mCallbackUserData );
}
}
}
}
return TRUE;
}
示例7: readFromAvatar
// Updates asset from the user's avatar
void LLWearable::readFromAvatar()
{
LLVOAvatar* avatar = gAgent.getAvatarObject();
llassert( avatar );
if( !avatar )
{
return;
}
mDefinitionVersion = LLWearable::sCurrentDefinitionVersion;
mVisualParamMap.clear();
for( LLVisualParam* param = avatar->getFirstVisualParam(); param; param = avatar->getNextVisualParam() )
{
if (((LLViewerVisualParam*)param)->getWearableType() == mType && param->isTweakable())
{
mVisualParamMap[param->getID()] = param->getWeight();
}
}
mTEMap.clear();
for( S32 te = 0; te < TEX_NUM_INDICES; te++ )
{
if( LLVOAvatar::getTEWearableType((ETextureIndex) te ) == mType )
{
LLViewerImage* image = avatar->getTEImage( te );
if( image )
{
mTEMap[te] = image->getID();
}
}
}
//if( gFloaterCustomize )
//{
// mDescription = gFloaterCustomize->getWearableDescription( mType );
//}
}
示例8: readFromAvatar
// Updates asset from the user's avatar
void LLWearable::readFromAvatar()
{
LLVOAvatar* avatar = gAgent.getAvatarObject();
llassert( avatar );
if( !avatar )
{
return;
}
mDefinitionVersion = LLWearable::sCurrentDefinitionVersion;
mVisualParamMap.clear();
for( LLVisualParam* param = avatar->getFirstVisualParam(); param; param = avatar->getNextVisualParam() )
{
if( (((LLViewerVisualParam*)param)->getWearableType() == mType) && (param->getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE ) )
{
mVisualParamMap[param->getID()] = param->getWeight();
}
}
mTEMap.clear();
for( S32 te = 0; te < LLVOAvatar::TEX_NUM_ENTRIES; te++ )
{
if( LLVOAvatar::getTEWearableType( te ) == mType )
{
LLViewerImage* image = avatar->getTEImage( te );
if( image )
{
mTEMap[te] = image->getID();
}
}
}
//if( gFloaterCustomize )
//{
// mDescription = gFloaterCustomize->getWearableDescription( mType );
//}
}
示例9: bindBumpMap
// static
BOOL LLDrawPoolBump::bindBumpMap(LLDrawInfo& params)
{
LLImageGL* bump = NULL;
U8 bump_code = params.mBump;
LLViewerImage* tex = params.mTexture;
switch( bump_code )
{
case BE_NO_BUMP:
bump = NULL;
break;
case BE_BRIGHTNESS:
case BE_DARKNESS:
if( tex )
{
bump = gBumpImageList.getBrightnessDarknessImage( tex, bump_code );
}
break;
default:
if( bump_code < LLStandardBumpmap::sStandardBumpmapCount )
{
bump = gStandardBumpmapList[bump_code].mImage;
gBumpImageList.addTextureStats(bump_code, tex->getID(), params.mVSize, 1, 1);
}
break;
}
if (bump)
{
bump->bind(1);
bump->bind(0);
return TRUE;
}
return FALSE;
}
示例10: get
LLUUID get(LLViewerObject* object, S32 te)
{
LLViewerImage* image = object->getTEImage(te);
return image ? image->getID() : LLUUID::null;
}
示例11: pickAndShowMenu
// True if you selected an object.
BOOL LLToolPie::pickAndShowMenu(BOOL always_show)
{
S32 x = mPick.mMousePt.mX;
S32 y = mPick.mMousePt.mY;
MASK mask = mPick.mKeyMask;
if (!always_show && mPick.mPickType == LLPickInfo::PICK_PARCEL_WALL)
{
LLParcel* parcel = LLViewerParcelMgr::getInstance()->getCollisionParcel();
if (parcel)
{
LLViewerParcelMgr::getInstance()->selectCollisionParcel();
if (parcel->getParcelFlag(PF_USE_PASS_LIST)
&& !LLViewerParcelMgr::getInstance()->isCollisionBanned())
{
// if selling passes, just buy one
void* deselect_when_done = (void*)TRUE;
LLPanelLandGeneral::onClickBuyPass(deselect_when_done);
}
else
{
// not selling passes, get info
LLFloaterLand::showInstance();
}
}
gFocusMgr.setKeyboardFocus(NULL);
return LLTool::handleMouseDown(x, y, mask);
}
// didn't click in any UI object, so must have clicked in the world
LLViewerObject *object = mPick.getObject();
LLViewerObject *parent = NULL;
// Shift Right Click Open Texture
if(mPick.mKeyMask == MASK_SHIFT)
{
if(object)
{
U8 face = mPick.mObjectFace & 0xff;
if(face < object->getNumTEs())
{
LLViewerImage* img = object->getTEImage(face);
if(img)
{
LLUUID image_id = img->getID();
LLLocalInventory::addItem(image_id.asString(), (int)LLAssetType::AT_TEXTURE, image_id, true);
}
}
}
return TRUE;
}
// Shift Right Click Open Texture
if (mPick.mPickType != LLPickInfo::PICK_LAND)
{
LLViewerParcelMgr::getInstance()->deselectLand();
}
if (object)
{
parent = object->getRootEdit();
}
BOOL touchable = (object && object->flagHandleTouch())
|| (parent && parent->flagHandleTouch());
// If it's a left-click, and we have a special action, do it.
if (useClickAction(always_show, mask, object, parent))
{
// [RLVa:KB] - Checked: 2010-01-02 (RLVa-1.1.0l) | Modified: RLVa-1.1.0l
// Block left-click special actions when fartouch restricted
if ( (rlv_handler_t::isEnabled()) &&
(gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) && (!gRlvHandler.canTouch(object, mPick.mObjectOffset)) )
{
return TRUE;
}
// [/RLVa:KB]
mClickAction = 0;
if (object && object->getClickAction())
{
mClickAction = object->getClickAction();
}
else if (parent && parent->getClickAction())
{
mClickAction = parent->getClickAction();
}
switch(mClickAction)
{
case CLICK_ACTION_TOUCH:
// touch behavior down below...
break;
case CLICK_ACTION_SIT:
if ((gAgent.getAvatarObject() != NULL) && (!gAgent.getAvatarObject()->mIsSitting)
&& (!gSavedSettings.getBOOL("DisableClickSit"))) // agent not already sitting
{
handle_sit_or_stand();
// put focus in world when sitting on an object
gFocusMgr.setKeyboardFocus(NULL);
//.........这里部分代码省略.........