当前位置: 首页>>代码示例>>C++>>正文


C++ LLMotion::getController方法代码示例

本文整理汇总了C++中LLMotion::getController方法的典型用法代码示例。如果您正苦于以下问题:C++ LLMotion::getController方法的具体用法?C++ LLMotion::getController怎么用?C++ LLMotion::getController使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LLMotion的用法示例。


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

示例1: pauseAllSyncedCharacters

void LLMotionController::pauseAllSyncedCharacters(std::vector<LLAnimPauseRequest>& avatar_pause_handles)
{
	// Run over all motions.
	for (motion_list_t::iterator iter = mActiveMotions.begin(); iter != mActiveMotions.end(); ++iter)
	{
		LLMotion* motionp = *iter;
		AISyncServer* server = motionp->server();
		if (server && !server->never_synced() && motionp->isActive())			// Skip motions that aren't synchronized at all or that are not active.
		{
			// Run over all clients of the found servers.
			AISyncServer::client_list_t const& clients = server->getClients();
			for (AISyncServer::client_list_t::const_iterator client = clients.begin(); client != clients.end(); ++client)
			{
				LLMotion* motion = dynamic_cast<LLMotion*>(client->mClientPtr);
				if (!motion)
				{
					continue;
				}
				LLMotionController* controller = motion->getController();
				if (controller == this)
				{
					continue;
				}
				controller->requestPause(avatar_pause_handles);
			}
		}
	}
}
开发者ID:AlericInglewood,项目名称:SingularityViewer,代码行数:28,代码来源:llmotioncontroller.cpp

示例2: toggle_hidden

//<singu>
//-----------------------------------------------------------------------------
// toggle_hidden()
//-----------------------------------------------------------------------------
void LLMotionController::toggle_hidden(void)
{
	mHaveVisibleSyncedMotions = mHidden;		// Default is false if we just became invisible (otherwise this value isn't used).
	mHidden = !mHidden;
	synceventset_t const visible = mHidden ? 0 : 4;

	// Run over all motions.
	for (motion_list_t::iterator iter = mActiveMotions.begin(); iter != mActiveMotions.end(); ++iter)
	{
		LLMotion* motionp = *iter;
		AISyncServer* server = motionp->server();
		if (server && !server->never_synced() && motionp->isActive())			// Skip motions that aren't synchronized at all or that are not active.
		{
			bool visible_before = server->events_with_at_least_one_client_ready() & 4;
			server->ready(4, visible, motionp);									// Mark that now we are visible or no longer visible.
			bool visible_after = server->events_with_at_least_one_client_ready() & 4;
			if (visible_after)													// Are there any synchronized motions (left) that ARE visible?
			{
				mHaveVisibleSyncedMotions = true;
			}
			if (visible_before != visible_after)
			{
				// The group as a whole now might need to change whether or not it is animated.
				AISyncServer::client_list_t const& clients = server->getClients();
				for (AISyncServer::client_list_t::const_iterator client = clients.begin(); client != clients.end(); ++client)
				{
					LLMotion* motion = dynamic_cast<LLMotion*>(client->mClientPtr);
					if (!motion)
					{
						continue;
					}
					LLMotionController* controller = motion->getController();
					if (controller == this)
					{
						continue;
					}
					if (visible_after)
					{
					  // Us becoming visible means that all synchronized avatars need to be animated again too.
					  controller->setHaveVisibleSyncedMotions();
					}
					else
					{
					  // Us becoming hidden means that all synchronized avatars might stop animating.
					  controller->refresh_hidden();		// It is extremely unlikely, but harmless, to call this twice on the same controller.
					}
				}
			}
		}
	}
}
开发者ID:AlericInglewood,项目名称:SingularityViewer,代码行数:55,代码来源:llmotioncontroller.cpp


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