本文整理汇总了C++中LLAgent::sendAnimationRequest方法的典型用法代码示例。如果您正苦于以下问题:C++ LLAgent::sendAnimationRequest方法的具体用法?C++ LLAgent::sendAnimationRequest怎么用?C++ LLAgent::sendAnimationRequest使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLAgent
的用法示例。
在下文中一共展示了LLAgent::sendAnimationRequest方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: playAnim
// static
void LLPreviewAnim::playAnim( void *userdata )
{
LLPreviewAnim* self = (LLPreviewAnim*) userdata;
const LLInventoryItem *item = self->getItem();
if(item)
{
LLUUID itemID=item->getAssetUUID();
LLButton* btn = self->getChild<LLButton>("Anim play btn");
if (btn)
{
btn->toggleState();
}
if (self->childGetValue("Anim play btn").asBoolean() )
{
self->mPauseRequest = NULL;
gAgent.sendAnimationRequest(itemID, ANIM_REQUEST_START);
LLVOAvatar* avatar = gAgent.getAvatarObject();
LLMotion* motion = avatar->findMotion(itemID);
if (motion)
{
motion->setDeactivateCallback(&endAnimCallback, (void *)(new LLHandle<LLFloater>(self->getHandle())));
}
}
else
{
gAgent.getAvatarObject()->stopMotion(itemID);
gAgent.sendAnimationRequest(itemID, ANIM_REQUEST_STOP);
}
}
}
示例2: onClose
void LLPreviewAnim::onClose(bool app_quitting)
{
const LLInventoryItem *item = getItem();
if(item)
{
gAgentAvatarp->stopMotion(item->getAssetUUID());
gAgent.sendAnimationRequest(item->getAssetUUID(), ANIM_REQUEST_STOP);
LLMotion* motion = gAgentAvatarp->findMotion(item->getAssetUUID());
if (motion)
{
// *TODO: minor memory leak here, user data is never deleted (Use real callbacks)
motion->setDeactivateCallback(NULL, (void *)NULL);
}
}
destroy();
}