Overte C++ Documentation
ElbowConstraint.h
1
//
2
// ElbowConstraint.h
3
//
4
// Copyright 2015 High Fidelity, Inc.
5
//
6
// Distributed under the Apache License, Version 2.0.
7
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
8
//
9
10
#ifndef hifi_ElbowConstraint_h
11
#define hifi_ElbowConstraint_h
12
13
#include "RotationConstraint.h"
14
15
class
ElbowConstraint :
public
RotationConstraint {
16
public
:
17
ElbowConstraint();
18
void
setHingeAxis(
const
glm::vec3& axis);
19
void
setAngleLimits(
float
minAngle,
float
maxAngle);
20
virtual
bool
apply(glm::quat& rotation)
const override
;
21
virtual
glm::quat computeCenterRotation()
const override
;
22
23
glm::vec3 getHingeAxis()
const
{
return
_axis; }
24
float
getMinAngle()
const
{
return
_minAngle; }
25
float
getMaxAngle()
const
{
return
_maxAngle; }
26
27
protected
:
28
glm::vec3 _axis;
29
glm::vec3 _perpAxis;
30
float
_minAngle;
31
float
_maxAngle;
32
};
33
34
#endif
// hifi_ElbowConstraint_h
libraries
animation
src
ElbowConstraint.h
Generated by
1.9.1