vcsl_displacement.h
Go to the documentation of this file.
1 // This is core/vcsl/vcsl_displacement.h
2 #ifndef vcsl_displacement_h_
3 #define vcsl_displacement_h_
4 //:
5 // \file
6 // \brief Affine rotation
7 // \author Francois BERTEL
8 //
9 // \verbatim
10 // Modifications
11 // 2000/06/28 Francois BERTEL Creation. Adapted from IUE
12 // 2002/01/22 Peter Vanroose - return type of execute() and inverse() changed to non-ptr
13 // 2002/01/28 Peter Vanroose - std::vector member point_ changed to non-ptr
14 // 2004/09/17 Peter Vanroose - made point() non-virtual - it just returns a member and should not be overloaded
15 // \endverbatim
16 
17 #include <vcsl/vcsl_rotation.h>
19 
20 //: Affine rotation
21 // A displacement rotates a point with a given angle around an axis defined by
22 // a point and a unit vector
24  :public vcsl_rotation
25 {
26  public:
27  //***************************************************************************
28  // Constructors/Destructor
29  //***************************************************************************
30 
31  // Default constructor
32  vcsl_displacement() = default;
33 
34  // Destructor
35  ~vcsl_displacement() override = default;
36 
37  //***************************************************************************
38  // Status report
39  //***************************************************************************
40 
41  //: Is `this' correctly set ?
42  // Virtual function of vcsl_spatial_transformation
43  bool is_valid() const override
44  { return vcsl_rotation::is_valid() && this->duration()==point_.size(); }
45 
46  //***************************************************************************
47  // Transformation parameters
48  //***************************************************************************
49 
50  //: Set the point for a static displacement
51  void set_static_point(vnl_vector<double> const& new_point);
52 
53  //: Set the variation of the point of the axis along the time
54  void set_point(list_of_vectors const& new_point) { point_=new_point; }
55 
56  //: Return the variation of the point of the axis along the time
57  list_of_vectors point() const { return point_; }
58 
59  //***************************************************************************
60  // Basic operations
61  //***************************************************************************
62 
63  //: Image of `v' by `this'
64  // REQUIRE: is_valid()
65  // Pure virtual function of vcsl_spatial_transformation
67  double time) const override;
68 
69  //: Image of `v' by the inverse of `this'
70  // REQUIRE: is_valid()
71  // REQUIRE: is_invertible(time)
72  // Pure virtual function of vcsl_spatial_transformation
74  double time) const override;
75  protected:
76 
77  //: Compute the value of the vector at time `time'
78  vnl_vector<double> vector_value(double time) const;
79 
80  //: Variation of the point of the axis along the time
82 };
83 
84 #endif // vcsl_displacement_h_
unsigned int duration() const
Return the time duration.
std::vector< vnl_vector< double > > list_of_vectors
void set_point(list_of_vectors const &new_point)
Set the variation of the point of the axis along the time.
~vcsl_displacement() override=default
vnl_vector< double > inverse(const vnl_vector< double > &v, double time) const override
Image of ‘v’ by the inverse of ‘this’.
bool is_valid() const override
Is ‘this’ correctly set ?.
vnl_vector< double > vector_value(double time) const
Compute the value of the vector at time ‘time’.
list_of_vectors point() const
Return the variation of the point of the axis along the time.
Rotation transformation (either 2D or 3D)
Affine rotation.
list_of_vectors point_
Variation of the point of the axis along the time.
void set_static_point(vnl_vector< double > const &new_point)
Set the point for a static displacement.
vnl_vector< double > execute(const vnl_vector< double > &v, double time) const override
Image of ‘v’ by ‘this’.
Rotation transformation (either 2D or 3D).
Definition: vcsl_rotation.h:26
bool is_valid() const override
Is ‘this’ correctly set ?.
Definition: vcsl_rotation.h:51
vcsl_displacement()=default