mirror of
https://github.com/overte-org/overte.git
synced 2025-06-18 00:00:43 +02:00
Conflicts: interface/src/avatar/MyAvatar.cpp interface/src/avatar/SkeletonModel.cpp interface/src/avatar/SkeletonModel.h libraries/avatars/src/HandData.h libraries/shared/src/SharedUtil.h
50 lines
1.3 KiB
C++
50 lines
1.3 KiB
C++
//
|
|
// SkeletonModel.h
|
|
// interface
|
|
//
|
|
// Created by Andrzej Kapolka on 10/17/13.
|
|
// Copyright (c) 2013 High Fidelity, Inc. All rights reserved.
|
|
//
|
|
|
|
#ifndef __interface__SkeletonModel__
|
|
#define __interface__SkeletonModel__
|
|
|
|
|
|
#include "renderer/Model.h"
|
|
|
|
class Avatar;
|
|
|
|
/// A skeleton loaded from a model.
|
|
class SkeletonModel : public Model {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
SkeletonModel(Avatar* owningAvatar);
|
|
|
|
void simulate(float deltaTime, bool fullUpdate = true);
|
|
void syncToPalms();
|
|
bool render(float alpha);
|
|
|
|
/// \param jointIndex index of hand joint
|
|
/// \param shapes[out] list in which is stored pointers to hand shapes
|
|
void getHandShapes(int jointIndex, QVector<const Shape*>& shapes) const;
|
|
|
|
protected:
|
|
|
|
void applyHandPosition(int jointIndex, const glm::vec3& position);
|
|
|
|
void applyPalmData(int jointIndex, const QVector<int>& fingerJointIndices,
|
|
const QVector<int>& fingertipJointIndices, PalmData& palm);
|
|
|
|
/// Updates the state of the joint at the specified index.
|
|
virtual void updateJointState(int index);
|
|
|
|
virtual void maybeUpdateLeanRotation(const JointState& parentState, const FBXJoint& joint, JointState& state);
|
|
|
|
private:
|
|
|
|
Avatar* _owningAvatar;
|
|
};
|
|
|
|
#endif /* defined(__interface__SkeletonModel__) */
|