| 96 | } |
| 97 | |
| 98 | void 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 | |
| 128 | void Bone3D::clearBoneBlendState() |
| 129 | { |
no test coverage detected