overte-HifiExperiments/libraries/animation/src/ElbowConstraint.h
2015-09-08 18:20:03 -07:00

28 lines
696 B
C++

//
// ElbowConstraint.h
//
// Copyright 2015 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_ElbowConstraint_h
#define hifi_ElbowConstraint_h
#include "RotationConstraint.h"
class ElbowConstraint : public RotationConstraint {
public:
ElbowConstraint();
void setHingeAxis(const glm::vec3& axis);
void setAngleLimits(float minAngle, float maxAngle);
virtual bool apply(glm::quat& rotation) const override;
protected:
glm::vec3 _axis;
glm::vec3 _perpAxis;
float _minAngle;
float _maxAngle;
};
#endif // hifi_ElbowConstraint_h