MCPcopy Create free account
hub / github.com/axmolengine/axmol / setAnimationValue

Method setAnimationValue

core/3d/Skeleton3D.cpp:98–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96}
97
98void Bone3D::setAnimationValue(float* trans, float* rot, float* scale, void* tag, float weight)
99{
100 for (auto&& it : _blendStates)
101 {
102 if (it.tag == tag)
103 {
104 if (trans)
105 it.localTranslate.set(trans);
106 if (rot)
107 it.localRot.set(rot);
108 if (scale)
109 it.localScale.set(scale);
110 it.weight = weight;
111 return;
112 }
113 }
114 BoneBlendState state;
115 if (trans)
116 state.localTranslate.set(trans);
117 if (rot)
118 state.localRot.set(rot);
119 if (scale)
120 state.localScale.set(scale);
121
122 state.weight = weight;
123 state.tag = tag;
124
125 _blendStates.emplace_back(state);
126}
127
128void Bone3D::clearBoneBlendState()
129{

Callers 1

updateMethod · 0.80

Calls 2

setMethod · 0.45
emplace_backMethod · 0.45

Tested by

no test coverage detected