本文整理汇总了C++中LLPointer::getID方法的典型用法代码示例。如果您正苦于以下问题:C++ LLPointer::getID方法的具体用法?C++ LLPointer::getID怎么用?C++ LLPointer::getID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLPointer
的用法示例。
在下文中一共展示了LLPointer::getID方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: handleMouseDown
BOOL LLTextureBar::handleMouseDown(S32 x, S32 y, MASK mask)
{
if ((mask & (MASK_CONTROL|MASK_SHIFT|MASK_ALT)) == MASK_ALT)
{
LLAppViewer::getTextureFetch()->mDebugID = mImagep->getID();
return TRUE;
}
return LLView::handleMouseDown(x,y,mask);
}
示例2: setFocusFace
void LLViewerMediaFocus::setFocusFace( BOOL b, LLPointer<LLViewerObject> objectp, S32 face, viewer_media_t media_impl )
{
LLParcel *parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
if (b && media_impl.notNull())
{
mMediaImpl = media_impl;
LLSelectMgr::getInstance()->deselectAll();
LLSelectMgr::getInstance()->selectObjectOnly(objectp, face);
mFocus = LLSelectMgr::getInstance()->getSelection();
if(mMediaHUD.get() && ! parcel->getMediaPreventCameraZoom())
{
mMediaHUD.get()->resetZoomLevel();
mMediaHUD.get()->nextZoomLevel();
}
if (!mFocus->isEmpty())
{
gFocusMgr.setKeyboardFocus(this);
}
mObjectID = objectp->getID();
// LLViewerMedia::addObserver(this, mObjectID);
}
else
{
gFocusMgr.setKeyboardFocus(NULL);
if(! parcel->getMediaPreventCameraZoom())
{
if (!mFocus->isEmpty())
{
gAgentCamera.setFocusOnAvatar(TRUE, ANIMATE);
}
}
mFocus = NULL;
// LLViewerMedia::remObserver(this, mObjectID);
// Null out the media hud media pointer
if(mMediaHUD.get())
{
mMediaHUD.get()->setMediaImpl(NULL);
}
// and null out the media impl
mMediaImpl = NULL;
}
if(mMediaHUD.get())
{
mMediaHUD.get()->setMediaFocus(b);
}
}
示例3: setHoverFace
void LLViewerMediaFocus::setHoverFace(LLPointer<LLViewerObject> objectp, S32 face, viewer_media_t media_impl, LLVector3 pick_normal)
{
if (media_impl.notNull())
{
mHoverImplID = media_impl->getMediaTextureID();
mHoverObjectID = objectp->getID();
mHoverObjectFace = face;
mHoverObjectNormal = pick_normal;
}
else
{
mHoverObjectID = LLUUID::null;
mHoverObjectFace = 0;
mHoverImplID = LLUUID::null;
}
}
示例4: updateImageStats
void LLFloaterTexturePicker::updateImageStats()
{
if (mTexturep.notNull())
{
//RN: have we received header data for this image?
if (mTexturep->getWidth(0) > 0 && mTexturep->getHeight(0) > 0)
{
std::string formatted_dims = llformat("%d x %d", mTexturep->getWidth(0),mTexturep->getHeight(0));
mResolutionLabel->setTextArg("[DIMENSIONS]", formatted_dims);
}
else
{
mResolutionLabel->setTextArg("[DIMENSIONS]", std::string("[? x ?]"));
}
if (gAgent.isGodlike())
{
std::string tstring = "Pick: ";
std::string image_id_string = mTexturep->getID().asString();
tstring = tstring + image_id_string.replace(24, 35, 12, '*'); // hide last segment to discourage theft
setTitle(tstring);
}
}
}
示例5: setFocusFace
void LLViewerMediaFocus::setFocusFace(LLPointer<LLViewerObject> objectp, S32 face, viewer_media_t media_impl, LLVector3 pick_normal)
{
LLParcel *parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
LLViewerMediaImpl *old_media_impl = getFocusedMediaImpl();
if(old_media_impl)
{
old_media_impl->focus(false);
}
// Always clear the current selection. If we're setting focus on a face, we'll reselect the correct object below.
LLSelectMgr::getInstance()->deselectAll();
mSelection = NULL;
if (media_impl.notNull() && objectp.notNull())
{
bool face_auto_zoom = false;
mFocusedImplID = media_impl->getMediaTextureID();
mFocusedObjectID = objectp->getID();
mFocusedObjectFace = face;
mFocusedObjectNormal = pick_normal;
// Set the selection in the selection manager so we can draw the focus ring.
mSelection = LLSelectMgr::getInstance()->selectObjectOnly(objectp, face);
// Focusing on a media face clears its disable flag.
media_impl->setDisabled(false);
LLTextureEntry* tep = objectp->getTE(face);
if(tep->hasMedia())
{
LLMediaEntry* mep = tep->getMediaData();
face_auto_zoom = mep->getAutoZoom();
if(!media_impl->hasMedia())
{
std::string url = mep->getCurrentURL().empty() ? mep->getHomeURL() : mep->getCurrentURL();
media_impl->navigateTo(url, "", true);
}
}
else
{
// This should never happen.
llwarns << "Can't find media entry for focused face" << llendl;
}
media_impl->focus(true);
gFocusMgr.setKeyboardFocus(this);
// We must do this before processing the media HUD zoom, or it may zoom to the wrong face.
update();
if(mMediaControls.get())
{
if(face_auto_zoom && ! parcel->getMediaPreventCameraZoom())
{
// Zoom in on this face
mMediaControls.get()->resetZoomLevel(false);
mMediaControls.get()->nextZoomLevel();
}
else
{
// Reset the controls' zoom level without moving the camera.
// This fixes the case where clicking focus between two non-autozoom faces doesn't change the zoom-out button back to a zoom-in button.
mMediaControls.get()->resetZoomLevel(false);
}
}
}
else
{
if(hasFocus())
{
gFocusMgr.setKeyboardFocus(NULL);
}
mFocusedImplID = LLUUID::null;
if (objectp.notNull())
{
// Still record the focused object...it may mean we need to load media data.
// This will aid us in determining this object is "important enough"
mFocusedObjectID = objectp->getID();
mFocusedObjectFace = face;
}
else {
mFocusedObjectID = LLUUID::null;
mFocusedObjectFace = 0;
}
}
}
示例6: isHoveringOverFace
bool LLViewerMediaFocus::isHoveringOverFace(LLPointer<LLViewerObject> objectp, S32 face)
{
return objectp->getID() == mHoverObjectID && face == mHoverObjectFace;
}
示例7: isFocusedOnFace
bool LLViewerMediaFocus::isFocusedOnFace(LLPointer<LLViewerObject> objectp, S32 face)
{
return objectp->getID() == mFocusedObjectID && face == mFocusedObjectFace;
}
示例8: draw
void LLTextureView::draw()
{
if (!mFreezeView)
{
// LLViewerObject *objectp;
// S32 te;
for_each(mTextureBars.begin(), mTextureBars.end(), DeletePointer());
mTextureBars.clear();
delete mGLTexMemBar;
mGLTexMemBar = 0;
typedef std::multiset<decode_pair_t, compare_decode_pair > display_list_t;
display_list_t display_image_list;
if (mPrintList)
{
llinfos << "ID\tMEM\tBOOST\tPRI\tWIDTH\tHEIGHT\tDISCARD" << llendl;
}
for (LLViewerImageList::image_priority_list_t::iterator iter = gImageList.mImageList.begin();
iter != gImageList.mImageList.end(); )
{
LLPointer<LLViewerImage> imagep = *iter++;
S32 cur_discard = imagep->getDiscardLevel();
S32 desired_discard = imagep->mDesiredDiscardLevel;
if (mPrintList)
{
llinfos << imagep->getID()
<< "\t" << imagep->mTextureMemory
<< "\t" << imagep->getBoostLevel()
<< "\t" << imagep->getDecodePriority()
<< "\t" << imagep->getWidth()
<< "\t" << imagep->getHeight()
<< "\t" << cur_discard
<< llendl;
}
#if 0
if (imagep->getDontDiscard())
{
continue;
}
if (imagep->isMissingAsset())
{
continue;
}
#endif
#define HIGH_PRIORITY 100000000.f
F32 pri;
if (mOrderFetch)
{
pri = ((F32)imagep->mFetchPriority)/256.f;
}
else
{
pri = imagep->getDecodePriority();
}
if (sDebugImages.find(imagep) != sDebugImages.end())
{
pri += 4*HIGH_PRIORITY;
}
if (!mOrderFetch)
{
#if 1
if (pri < HIGH_PRIORITY && LLSelectMgr::getInstance())
{
struct f : public LLSelectedTEFunctor
{
LLViewerImage* mImage;
f(LLViewerImage* image) : mImage(image) {}
virtual bool apply(LLViewerObject* object, S32 te)
{
return (mImage == object->getTEImage(te));
}
} func(imagep);
const bool firstonly = true;
bool match = LLSelectMgr::getInstance()->getSelection()->applyToTEs(&func, firstonly);
if (match)
{
pri += 3*HIGH_PRIORITY;
}
}
#endif
#if 1
if (pri < HIGH_PRIORITY && (cur_discard< 0 || desired_discard < cur_discard))
{
LLViewerObject *objectp = gHoverView->getLastHoverObject();
if (objectp)
{
S32 tex_count = objectp->getNumTEs();
for (S32 i = 0; i < tex_count; i++)
{
//.........这里部分代码省略.........
示例9: draw
void LLTextureView::draw()
{
if (!mFreezeView)
{
// LLViewerObject *objectp;
// S32 te;
for_each(mTextureBars.begin(), mTextureBars.end(), KillView());
mTextureBars.clear();
if (mGLTexMemBar)
{
removeChild(mGLTexMemBar);
mGLTexMemBar->die();
mGLTexMemBar = 0;
}
if (mAvatarTexBar)
{
removeChild(mAvatarTexBar);
mAvatarTexBar->die();
mAvatarTexBar = 0;
}
typedef std::multiset<decode_pair_t, compare_decode_pair > display_list_t;
display_list_t display_image_list;
if (mPrintList)
{
llinfos << "ID\tMEM\tBOOST\tPRI\tWIDTH\tHEIGHT\tDISCARD" << llendl;
}
for (LLViewerTextureList::image_priority_list_t::iterator iter = gTextureList.mImageList.begin();
iter != gTextureList.mImageList.end(); )
{
LLPointer<LLViewerFetchedTexture> imagep = *iter++;
if(!imagep->hasFetcher())
{
continue ;
}
S32 cur_discard = imagep->getDiscardLevel();
S32 desired_discard = imagep->mDesiredDiscardLevel;
if (mPrintList)
{
S32 tex_mem = imagep->hasGLTexture() ? imagep->getTextureMemory() : 0 ;
llinfos << imagep->getID()
<< "\t" << tex_mem
<< "\t" << imagep->getBoostLevel()
<< "\t" << imagep->getDecodePriority()
<< "\t" << imagep->getWidth()
<< "\t" << imagep->getHeight()
<< "\t" << cur_discard
<< llendl;
}
if (imagep->getID() == LLAppViewer::getTextureFetch()->mDebugID)
{
static S32 debug_count = 0;
++debug_count; // for breakpoints
}
F32 pri;
if (mOrderFetch)
{
pri = ((F32)imagep->mFetchPriority)/256.f;
}
else
{
pri = imagep->getDecodePriority();
}
pri = llclamp(pri, 0.0f, HIGH_PRIORITY-1.f);
if (sDebugImages.find(imagep) != sDebugImages.end())
{
pri += 4*HIGH_PRIORITY;
}
if (!mOrderFetch)
{
if (pri < HIGH_PRIORITY && LLSelectMgr::getInstance())
{
struct f : public LLSelectedTEFunctor
{
LLViewerFetchedTexture* mImage;
f(LLViewerFetchedTexture* image) : mImage(image) {}
virtual bool apply(LLViewerObject* object, S32 te)
{
return (mImage == object->getTEImage(te));
}
} func(imagep);
const bool firstonly = true;
bool match = LLSelectMgr::getInstance()->getSelection()->applyToTEs(&func, firstonly);
if (match)
{
pri += 3*HIGH_PRIORITY;
}
}
//.........这里部分代码省略.........