ndcurves
2.3.0
create and manipulate spline and bezier curves.
Toggle main menu visibility
Loading...
Searching...
No Matches
cross_implementation.h
Go to the documentation of this file.
1
7
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
fwd.h
forward declaration of all curves class
ndcurves
Definition
bernstein.h:20
ndcurves::cross
bezier_curve_t cross(const bezier_curve_t &g) const
Compute the cross product of the current bezier curve by another bezier curve. The cross product p1Xp...
Definition
bezier_curve.h:515
ndcurves::linear_variable
Definition
linear_variable.h:26
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
include
ndcurves
cross_implementation.h
Generated by
1.17.0