cross_implementation.h
Go to the documentation of this file.
1 
8 #ifndef _CLASS_CROSSIMP
9 #define _CLASS_CROSSIMP
10 
11 #include "ndcurves/fwd.h"
12 
13 namespace ndcurves {
14 inline Eigen::Vector3d cross(const Eigen::VectorXd& a, const Eigen::VectorXd& b) {
15  Eigen::Vector3d c;
16  c << a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0];
17  return c;
18 }
19 
20 inline Eigen::Vector3d cross(const Eigen::Vector3d& a, const Eigen::Vector3d& b) { return a.cross(b); }
21 
22 inline Eigen::Vector3f cross(const Eigen::Vector3f& a, const Eigen::Vector3f& b) { return a.cross(b); }
23 
24 template <typename N, bool S>
26  return a.cross(b);
27 }
28 } // namespace ndcurves
29 #endif //_CLASS_CROSSIMP
Definition: bernstein.h:20
Eigen::Vector3d cross(const Eigen::VectorXd &a, const Eigen::VectorXd &b)
Definition: cross_implementation.h:14
forward declaration of all curves class
Definition: fwd.h:55
linear_variable_t cross(const linear_variable_t &other) const
Compute the cross product of the current linear_variable and the other. This method of course only ma...
Definition: linear_variable.h:134