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


C++ LLFloaterAnimPreview::childSetValue方法代码示例

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


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

示例1: validateLoopOut

//-----------------------------------------------------------------------------
// validateLoopOut()
//-----------------------------------------------------------------------------
BOOL LLFloaterAnimPreview::validateLoopOut(LLUICtrl* spin, void* data)
{
	LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data;
	if (!previewp->getEnabled())
		return FALSE;

	F32 loop_out_value = (F32)previewp->childGetValue("loop_out_point").asReal();
	F32 loop_in_value = (F32)previewp->childGetValue("loop_in_point").asReal();

	if (loop_out_value < 0.f)
	{
		loop_out_value = 0.f;
	}
	else if (loop_out_value > 100.f)
	{
		loop_out_value = 100.f;
	}
	else if (loop_out_value < loop_in_value)
	{
		loop_out_value = loop_in_value;
	}

	previewp->childSetValue("loop_out_point", LLSD(loop_out_value));
	return TRUE;
}
开发者ID:Xara,项目名称:Meerkat-Viewer,代码行数:28,代码来源:llfloateranimpreview.cpp

示例2: onCommitLoopOut

//-----------------------------------------------------------------------------
// onCommitLoopOut()
//-----------------------------------------------------------------------------
void LLFloaterAnimPreview::onCommitLoopOut(LLUICtrl* ctrl, void* data)
{
	LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data;
	if (!previewp->getEnabled())
		return;

	LLVOAvatar* avatarp;
	if (previewp->mInWorld)
	{
		if (!gAgent.getAvatarObject())
		{
			return;
		}
		avatarp = gAgent.getAvatarObject();
	}
	else
	{
		if (!previewp->mAnimPreview)
		{
			return;
		}
		avatarp = previewp->mAnimPreview->getDummyAvatar();
	}
	LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID);

	if (motionp)
	{
		motionp->setLoopOut((F32)previewp->childGetValue("loop_out_point").asReal() * 0.01f * motionp->getDuration());
		previewp->resetMotion();
		previewp->childSetValue("loop_check", LLSD(TRUE));
		onCommitLoop(ctrl, data);
	}
}
开发者ID:fractured-crystal,项目名称:SingularityViewer,代码行数:36,代码来源:llfloateranimpreview.cpp

示例3: validateEaseOut

//-----------------------------------------------------------------------------
// validateEaseOut()
//-----------------------------------------------------------------------------
BOOL LLFloaterAnimPreview::validateEaseOut(LLUICtrl* spin, void* data)
{
	LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data;

	if (!previewp->getEnabled())
		return FALSE;

	LLVOAvatar* avatarp;
	if (previewp->mInWorld)
	{
		if (!gAgent.getAvatarObject())
		{
			return FALSE;
		}
		avatarp = gAgent.getAvatarObject();
	}
	else
	{
		if (!previewp->mAnimPreview)
		{
			return FALSE;
		}
		avatarp = previewp->mAnimPreview->getDummyAvatar();
	}
	LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID);
	
	if (!motionp->getLoop())
	{
		F32 new_ease_out = llclamp((F32)previewp->childGetValue("ease_out_time").asReal(), 0.f, motionp->getDuration() - motionp->getEaseInDuration());
		previewp->childSetValue("ease_out_time", LLSD(new_ease_out));
	}

	return TRUE;
}
开发者ID:fractured-crystal,项目名称:SingularityViewer,代码行数:37,代码来源:llfloateranimpreview.cpp

示例4: validateEaseIn

//-----------------------------------------------------------------------------
// validateEaseIn()
//-----------------------------------------------------------------------------
BOOL LLFloaterAnimPreview::validateEaseIn(LLUICtrl* spin, void* data)
{
	LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data;	
	if (!previewp->getEnabled())
		return FALSE;

	LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar();
	LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID);
	
	if (!motionp->getLoop())
	{
		F32 new_ease_in = llclamp((F32)previewp->childGetValue("ease_in_time").asReal(), 0.f, motionp->getDuration() - motionp->getEaseOutDuration());
		previewp->childSetValue("ease_in_time", LLSD(new_ease_in));
	}
	
	return TRUE;
}
开发者ID:Xara,项目名称:Meerkat-Viewer,代码行数:20,代码来源:llfloateranimpreview.cpp

示例5: onCommitLoopIn

//-----------------------------------------------------------------------------
// onCommitLoopIn()
//-----------------------------------------------------------------------------
void LLFloaterAnimPreview::onCommitLoopIn(LLUICtrl* ctrl, void* data)
{
	LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data;
	if (!previewp->getEnabled())
		return;

	LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar();
	LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID);

	if (motionp)
	{
		motionp->setLoopIn((F32)previewp->childGetValue("loop_in_point").asReal() / 100.f);
		previewp->resetMotion();
		previewp->childSetValue("loop_check", LLSD(TRUE));
		onCommitLoop(ctrl, data);
	}
}
开发者ID:Xara,项目名称:Meerkat-Viewer,代码行数:20,代码来源:llfloateranimpreview.cpp


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