本文整理汇总了C++中LLVOAvatar::setAnimationData方法的典型用法代码示例。如果您正苦于以下问题:C++ LLVOAvatar::setAnimationData方法的具体用法?C++ LLVOAvatar::setAnimationData怎么用?C++ LLVOAvatar::setAnimationData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLVOAvatar
的用法示例。
在下文中一共展示了LLVOAvatar::setAnimationData方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: calcTargetPosition
//-----------------------------------------------------------------------------
// calcTargetPosition()
// returns whether we successfully calculated a finite target position.
//-----------------------------------------------------------------------------
bool LLHUDEffectPointAt::calcTargetPosition()
{
LLViewerObject *targetObject = (LLViewerObject *)mTargetObject;
LLVector3 local_offset;
if (targetObject)
{
local_offset.setVec(mTargetOffsetGlobal);
}
else
{
local_offset = gAgent.getPosAgentFromGlobal(mTargetOffsetGlobal);
}
if (targetObject && targetObject->mDrawable.notNull())
{
LLQuaternion objRot;
if (targetObject->isAvatar())
{
LLVOAvatar *avatarp = (LLVOAvatar *)targetObject;
mTargetPos = avatarp->mHeadp->getWorldPosition();
objRot = avatarp->mPelvisp->getWorldRotation();
}
else
{
if (targetObject->mDrawable->getGeneration() == -1)
{
mTargetPos = targetObject->getPositionAgent();
objRot = targetObject->getWorldRotation();
}
else
{
mTargetPos = targetObject->getRenderPosition();
objRot = targetObject->getRenderRotation();
}
}
mTargetPos += (local_offset * objRot);
}
else
{
mTargetPos = local_offset;
}
mTargetPos -= mSourceObject->getRenderPosition();
if (!llfinite(mTargetPos.lengthSquared()))
{
return false;
}
if (mSourceObject->isAvatar())
{
LLVOAvatar* avatarp = ((LLVOAvatar*)(LLViewerObject*)mSourceObject);
avatarp->setAnimationData("PointAtPoint", (void *)&mTargetPos);
avatarp->mIdleTimer.reset();
}
return true;
}