Exemple #1
0
void AnimOverlay::buildBothFeetBoneSet() {
    assert(_skeleton);
    buildEmptyBoneSet();
    int rightFoot = _skeleton->nameToJointIndex("RightFoot");
    for_each_child_joint(_skeleton, rightFoot, [&](int i) {
        _boneSetVec[i] = 1.0f;
    });
    int leftFoot = _skeleton->nameToJointIndex("LeftFoot");
    for_each_child_joint(_skeleton, leftFoot, [&](int i) {
        _boneSetVec[i] = 1.0f;
    });
}
Exemple #2
0
void AnimOverlay::buildUpperBodyBoneSet() {
    assert(_skeleton);
    buildEmptyBoneSet();
    int spineJoint = _skeleton->nameToJointIndex("Spine");
    for_each_child_joint(_skeleton, spineJoint, [&](int i) {
        _boneSetVec[i] = 1.0f;
    });
}
Exemple #3
0
void AnimOverlay::buildBelowTheHeadBoneSet() {
    assert(_skeleton);
    buildFullBodyBoneSet();
    int headJoint = _skeleton->nameToJointIndex("Head");
    for_each_child_joint(_skeleton, headJoint, [&](int i) {
        _boneSetVec[i] = 0.0f;
    });
}
Exemple #4
0
void AnimOverlay::buildLeftArmBoneSet() {
    assert(_skeleton);
    buildEmptyBoneSet();
    int leftShoulderJoint = _skeleton->nameToJointIndex("LeftShoulder");
    for_each_child_joint(_skeleton, leftShoulderJoint, [&](int i) {
        _boneSetVec[i] = 1.0f;
    });
}
Exemple #5
0
void AnimOverlay::buildRightHandBoneSet() {
    assert(_skeleton);
    buildEmptyBoneSet();
    int handJoint = _skeleton->nameToJointIndex("RightHand");
    for_each_child_joint(_skeleton, handJoint, [&](int i) {
        _boneSetVec[i] = 1.0f;
    });
}
Exemple #6
0
void AnimOverlay::buildLowerBodyBoneSet() {
    assert(_skeleton);
    buildFullBodyBoneSet();
    int hipsJoint = _skeleton->nameToJointIndex("Hips");
    int spineJoint = _skeleton->nameToJointIndex("Spine");
    _boneSetVec.resize(_skeleton->getNumJoints());
    for_each_child_joint(_skeleton, spineJoint, [&](int i) {
        _boneSetVec[i] = 0.0f;
    });
    _boneSetVec[hipsJoint] = 0.0f;
}