16 #ifndef OSGANIMATION_TARGET
17 #define OSGANIMATION_TARGET 1
24 #include <osg/Referenced>
25 #include <osgAnimation/Export>
38 void reset() { _weight = 0; _priorityWeight = 0; }
39 int getCount()
const {
return referenceCount(); }
57 inline void lerp(
float t,
const T& a,
const T& b);
68 void update(
float weight,
const T& val,
int priority)
104 _target = a * (1.0f - t) + b * t;
112 _target = a * (1.0f - t) + b * -t;
116 _target = a * (1.0f - t) + b * t;
120 if ( len2 != 1.0 && len2 != 0.0)
121 _target *= 1.0/sqrt(len2);
#define OSGANIMATION_EXPORT
void lerp(float t, const T &a, const T &b)
void update(float weight, const T &val, int priority)
const T & getValue() const
TemplateTarget< osg::Matrixf > MatrixTarget
TemplateTarget(const T &v)
TemplateTarget< osg::Vec4 > Vec4Target
void setValue(const T &value)
TemplateTarget< osg::Vec3 > Vec3Target
TemplateTarget< osg::Quat > QuatTarget
TemplateTarget< double > DoubleTarget
value_type length2() const
Length of the quaternion = vec . vec.
TemplateTarget< float > FloatTarget
TemplateTarget(const TemplateTarget &v)
TemplateTarget< osg::Vec2 > Vec2Target