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,
15
const
Eigen::VectorXd& b) {
16
Eigen::Vector3d c;
17
c << a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2],
18
a[0] * b[1] - a[1] * b[0];
19
return
c;
20
}
21
22
inline
Eigen::Vector3d
cross
(
const
Eigen::Vector3d& a,
23
const
Eigen::Vector3d& b) {
24
return
a.cross(b);
25
}
26
27
inline
Eigen::Vector3f
cross
(
const
Eigen::Vector3f& a,
28
const
Eigen::Vector3f& b) {
29
return
a.cross(b);
30
}
31
32
template
<
typename
N,
bool
S>
33
linear_variable<N, S>
cross
(
const
linear_variable<N, S>
& a,
34
const
linear_variable<N, S>
& b) {
35
return
a.
cross
(b);
36
}
37
}
// namespace ndcurves
38
#endif //_CLASS_CROSSIMP
ndcurves::cross
Eigen::Vector3d cross(const Eigen::VectorXd &a, const Eigen::VectorXd &b)
Definition:
cross_implementation.h:14
fwd.h
forward declaration of all curves class
ndcurves
Definition:
bernstein.h:20
ndcurves::linear_variable::cross
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:158
ndcurves::linear_variable
Definition:
fwd.h:63
include
ndcurves
cross_implementation.h
Generated by
1.8.17