• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ viewer_media_t类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中viewer_media_t的典型用法代码示例。如果您正苦于以下问题:C++ viewer_media_t类的具体用法?C++ viewer_media_t怎么用?C++ viewer_media_t使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了viewer_media_t类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: setMediaFace

void LLPanelPrimMediaControls::setMediaFace(LLPointer<LLViewerObject> objectp, S32 face, viewer_media_t media_impl, LLVector3 pick_normal)
{
	if (media_impl.notNull() && objectp.notNull())
	{
		LLUUID prev_id = mTargetImplID;
		mTargetImplID = media_impl->getMediaTextureID();
		mTargetObjectID = objectp->getID();
		mTargetObjectFace = face;
		mTargetObjectNormal = pick_normal;
		mClearFaceOnFade = false;
		
		if (prev_id != mTargetImplID)
			mVolumeSliderCtrl->setValue(media_impl->getVolume());
	}
	else
	{
		// This happens on a timer now.
//		mTargetImplID = LLUUID::null;
//		mTargetObjectID = LLUUID::null;
//		mTargetObjectFace = 0;
		mClearFaceOnFade = true;
	}

	updateShape();
}
开发者ID:,项目名称:,代码行数:25,代码来源:


示例2: 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;
	}
}
开发者ID:kow,项目名称:Astra-Viewer-2,代码行数:16,代码来源:llviewermediafocus.cpp


示例3: 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);
	}
}
开发者ID:BillBarnhill,项目名称:SingularityViewer,代码行数:51,代码来源:llviewermediafocus.cpp


示例4: setMouseOverFlag

void LLViewerMediaFocus::setMouseOverFlag(bool b, viewer_media_t media_impl)
{
	if (b && media_impl.notNull())
	{
		if(! mMediaHUD.get())
		{
			LLPanelMediaHUD* media_hud = new LLPanelMediaHUD(mMediaImpl);
			mMediaHUD = media_hud->getHandle();
			gHUDView->addChild(media_hud);	
		}
		mMediaHUD.get()->setMediaImpl(media_impl);
		mMediaImpl = media_impl;
	}
	mMouseOverFlag = b;
}
开发者ID:BillBarnhill,项目名称:SingularityViewer,代码行数:15,代码来源:llviewermediafocus.cpp


示例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;
		}
	}
}
开发者ID:kow,项目名称:Astra-Viewer-2,代码行数:89,代码来源:llviewermediafocus.cpp


示例6: updateSecureBrowsing

void LLInspectObject::updateSecureBrowsing()
{
	bool is_secure_browsing = false;
	
	if(mMediaImpl.notNull() 
	   && mMediaImpl->hasMedia())
	{
		LLPluginClassMedia* media_plugin = NULL;
		std::string current_url = "";
		media_plugin = mMediaImpl->getMediaPlugin();
		if(media_plugin)
		{
			if(media_plugin->pluginSupportsMediaTime())
			{
				current_url = mMediaImpl->getMediaURL();
			}
			else
			{
				current_url =  media_plugin->getLocation();
			}
		}
		
		std::string prefix =  std::string("https://");
		std::string test_prefix = current_url.substr(0, prefix.length());
		LLStringUtil::toLower(test_prefix);	
		if(test_prefix == prefix)
		{
			is_secure_browsing = true;
		}
	}
	getChild<LLUICtrl>("secure_browsing")->setVisible(is_secure_browsing);
}
开发者ID:HyangZhao,项目名称:NaCl-main,代码行数:32,代码来源:llinspectobject.cpp


示例7: updateMediaCurrentURL

void LLInspectObject::updateMediaCurrentURL()
{	
	if(!mMediaEntry)
		return;
	LLTextBox* textbox = getChild<LLTextBox>("object_media_url");
	std::string media_url = "";
	textbox->setValue(media_url);
	textbox->setToolTip(media_url);
	LLStringUtil::format_map_t args;
	
	if(mMediaImpl.notNull() && mMediaImpl->hasMedia())
	{
		
		LLPluginClassMedia* media_plugin = NULL;
		media_plugin = mMediaImpl->getMediaPlugin();
		if(media_plugin)
		{
			if(media_plugin->pluginSupportsMediaTime())
			{
				args["[CurrentURL]"] =  mMediaImpl->getMediaURL();
			}
			else
			{
				args["[CurrentURL]"] =  media_plugin->getLocation();
			}
			media_url = LLTrans::getString("CurrentURL", args);

		}
	}
	else if(mMediaEntry->getCurrentURL() != "")
	{
		args["[CurrentURL]"] = mMediaEntry->getCurrentURL();
		media_url = LLTrans::getString("CurrentURL", args);
	}

	textbox->setText(media_url);
	textbox->setToolTip(media_url);
}
开发者ID:HyangZhao,项目名称:NaCl-main,代码行数:38,代码来源:llinspectobject.cpp



注:本文中的viewer_media_t类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ vii类代码示例发布时间:2022-05-31
下一篇:
C++ videoInput类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap