10 #ifndef IMPKINEMATICS_DIRECTIONAL_DO_FS_H
11 #define IMPKINEMATICS_DIRECTIONAL_DO_FS_H
15 IMPKINEMATICS_BEGIN_NAMESPACE
29 current_delta_.resize(dofs_.size());
35 for (
unsigned int i = 0; i < dofs_.size(); i++) {
37 dofs_[i]->get_number_of_steps(endpoint1_[i], endpoint2_[i]);
38 if (dof_step_number > step_number_) step_number_ = dof_step_number;
41 for (
unsigned int i = 0; i < dofs_.size(); i++) {
42 current_delta_[i] = (endpoint2_[i] - endpoint1_[i]) / step_number_;
45 current_step_number_ = 0;
46 delta_ = 1.0 / step_number_;
53 for (
unsigned int i = 0; i < ret.size(); i++) {
54 ret[i] += current_step_number_ * current_delta_[i];
59 double get_value()
const {
return value_; }
62 void operator++(
int) {
63 current_step_number_++;
66 void operator--(
int) {
67 current_step_number_--;
84 int current_step_number_;
94 out <<
"(direction dof from " << endpoint1_ <<
" to " << endpoint2_
95 <<
" ; step number " << current_step_number_ <<
")";
101 IMPKINEMATICS_END_NAMESPACE
#define IMP_SHOWABLE_INLINE(Name, how_to_show)
Declare the methods needed by an object that can be printed.
#define IMP_VALUES(Name, PluralName)
Define the type for storing sets of values.
A class that holds DOF values for DOFs.