interpolate -> Interpolate.

This commit is contained in:
Federico Ponchio 2010-11-15 00:16:40 +00:00
parent 327de0c77e
commit ef57d3e7e5
1 changed files with 6 additions and 3 deletions

View File

@ -134,6 +134,8 @@ public:
S sca; S sca;
}; };
template <class S,class RotationType> Similarity<S,RotationType> &Invert(Similarity<S,RotationType> &m); template <class S,class RotationType> Similarity<S,RotationType> &Invert(Similarity<S,RotationType> &m);
template <class S,class RotationType> Similarity<S,RotationType> Inverse(const Similarity<S,RotationType> &m); template <class S,class RotationType> Similarity<S,RotationType> Inverse(const Similarity<S,RotationType> &m);
template <class S,class RotationType> Point3<S> operator*(const Similarity<S,RotationType> &m, const Point3<S> &p); template <class S,class RotationType> Point3<S> operator*(const Similarity<S,RotationType> &m, const Point3<S> &p);
@ -231,9 +233,9 @@ template <class S,class RotationType> Similarity<S,RotationType> Inverse(const S
template <class S,class RotationType> Similarity<S,RotationType> Interpolate(const Similarity<S,RotationType> &a, const Similarity<S,RotationType> &b, const S t) { template <class S,class RotationType> Similarity<S,RotationType> Interpolate(const Similarity<S,RotationType> &a, const Similarity<S,RotationType> &b, const S t) {
Similarity<S,RotationType> r; Similarity<S,RotationType> r;
r.rot = interpolate(a.rot, b.rot, t); r.rot = Interpolate(a.rot, b.rot, t);
r.tra = t * a.tra + (1-t) * b.tra; r.tra = a.tra * t + b.tra * (1-t);
r.sca = t * a.sca + (1-t) * b.sca; r.sca = a.sca * t + b.sca * (1-t);
return r; return r;
} }
@ -246,6 +248,7 @@ template <class S,class RotationType> Point3<S> operator*(const Similarity<S,Rot
return r; return r;
} }
//typedef Similarity<float> Similarityf; //typedef Similarity<float> Similarityf;
//typedef Similarity<double>Similarityd; //typedef Similarity<double>Similarityd;