5 # include <vcl_msvc_warnings.h> 14 if (
beat_.size() == 0)
return true;
29 int sup=
beat_.size()-1;
58 assert(index>=0 && (
unsigned)index+1<
beat_.size());
59 double t0=
beat_[index];
60 double t1=
beat_[index+1];
62 return (v0*(t1-time)+v1*(time-t0))/(t1-t0);
75 assert(index>=0 && (
unsigned)index+1<
beat_.size());
76 double t0=
beat_[index];
77 double t1=
beat_[index+1];
79 double denominator=1/(t1-t0);
80 double dt1=(t1-time)*denominator;
81 double dt0=(time-t0)*denominator;
84 for (
int i=0;i<size;++i)
85 result.
put(i,v0.
get(i)*dt1+v1.
get(i)*dt0);
101 assert(index>=0 && (
unsigned)index+1<
beat_.size());
102 double t0=
beat_[index];
103 double t1=
beat_[index+1];
105 double denominator=1/(t1-t0);
106 double dt1=(t1-time)*denominator;
107 double dt0=(time-t0)*denominator;
110 for (
int i=0;i<rows;++i)
111 for (
int j=0;j<cols;++j)
112 result.
put(i,j,m0.
get(i,j)*dt1+m1.
get(i,j)*dt0);
126 assert(index>=0 && (
unsigned)index+1<
beat_.size());
127 double t0=
beat_[index];
128 double t1=
beat_[index+1];
129 double t=(time-t0)/(t1-t0);
132 double angle=std::acos(cosangle);
133 double invsin=1/std::sin(
angle);
134 double coef1=std::sin((1-t)*
angle)*invsin;
135 double coef2=std::sin(t*
angle)*invsin;
138 v0.
y()*coef1+v1.
y()*coef2,
139 v0.
z()*coef1+v1.
z()*coef2,
140 v0.
r()*coef1+v1.
r()*coef2);
unsigned int cols() const
VNL_EXPORT T dot_product(m const &, m const &)
vnl_vector_ref< T > as_ref()
VNL_EXPORT double angle(v const &, v const &)
double get(unsigned r, unsigned c) const
void put(size_t i, double const &v)
unsigned int rows() const
double get(size_t i) const
void put(unsigned r, unsigned c, double const &)