mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01:00
Target is now estimated in sensor space from the head, which is very deterministic and not prone to feedback from the IK system. Previous the hip was estimated from accumulated IK error deltas, which was not stable, as the error would tend to accumulate if the IK targets could not be reached.
33 lines
820 B
C++
33 lines
820 B
C++
//
|
|
// Created by Bradley Austin Davis on 2017/04/27
|
|
// Copyright 2013-2017 High Fidelity, Inc.
|
|
//
|
|
// Distributed under the Apache License, Version 2.0.
|
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
|
//
|
|
|
|
#ifndef hifi_MySkeletonModel_h
|
|
#define hifi_MySkeletonModel_h
|
|
|
|
#include <avatars-renderer/SkeletonModel.h>
|
|
#include "MyAvatar.h"
|
|
|
|
/// A skeleton loaded from a model.
|
|
class MySkeletonModel : public SkeletonModel {
|
|
Q_OBJECT
|
|
|
|
private:
|
|
using Parent = SkeletonModel;
|
|
|
|
public:
|
|
MySkeletonModel(Avatar* owningAvatar, QObject* parent = nullptr);
|
|
void updateRig(float deltaTime, glm::mat4 parentTransform) override;
|
|
|
|
private:
|
|
void updateFingers();
|
|
|
|
AnimPose _prevHips; // sensor frame
|
|
bool _prevHipsValid { false };
|
|
};
|
|
|
|
#endif // hifi_MySkeletonModel_h
|