本文整理汇总了C++中ogre::AnimationState::setBlendMaskEntry方法的典型用法代码示例。如果您正苦于以下问题:C++ AnimationState::setBlendMaskEntry方法的具体用法?C++ AnimationState::setBlendMaskEntry怎么用?C++ AnimationState::setBlendMaskEntry使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ogre::AnimationState
的用法示例。
在下文中一共展示了AnimationState::setBlendMaskEntry方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setEnabled
void Animation::setEnabled(bool enabled)
{
for (AnimationPartSet::const_iterator I = mAnimationParts.begin(); I != mAnimationParts.end(); ++I) {
//we'll get an assert error if we try to enable an animation with zero length
Ogre::AnimationState* state = I->state;
if (state->getLength() != 0) {
if (state->getEnabled() != enabled) {
state->setEnabled(enabled);
state->destroyBlendMask();
if (enabled) {
const std::vector<BoneGroupRef>& boneGroupRefs = I->boneGroupRefs;
for (std::vector<BoneGroupRef>::const_iterator J = boneGroupRefs.begin(); J != boneGroupRefs.end(); ++J) {
const BoneGroupRef& boneGroupRef = *J;
const BoneGroupDefinition& boneGroupDef = *boneGroupRef.boneGroupDefinition;
if (!state->hasBlendMask()) {
state->createBlendMask(mBoneNumber, 0.0f);
}
const std::vector<size_t>& boneIndices = boneGroupDef.Bones;
for (std::vector<size_t>::const_iterator bones_I = boneIndices.begin(); bones_I != boneIndices.end(); ++bones_I) {
state->setBlendMaskEntry(*bones_I, boneGroupRef.weight);
}
}
}
}
}
}
}