Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Jason Chemin
curves
Commits
0d2098ef
Commit
0d2098ef
authored
Oct 23, 2017
by
Steve Tonneau
Browse files
exposed bernstein
parent
91ffe2ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
python/spline_python.cpp
View file @
0d2098ef
...
...
@@ -4,6 +4,7 @@
#include
"spline/spline_deriv_constraint.h"
#include
"spline/curve_constraint.h"
#include
"spline/bezier_polynom_conversion.h"
#include
"spline/bernstein.h"
#include
<vector>
...
...
@@ -37,12 +38,15 @@ typedef polynom_t::coeff_t coeff_t;
typedef
std
::
pair
<
real
,
point_t
>
waypoint_t
;
typedef
std
::
vector
<
waypoint_t
,
Eigen
::
aligned_allocator
<
point_t
>
>
t_waypoint_t
;
typedef
spline
::
Bern
<
double
>
bernstein_t
;
typedef
spline
::
spline_deriv_constraint
<
real
,
real
,
3
,
true
,
point_t
,
t_point_t
>
spline_deriv_constraint_t
;
typedef
spline
::
curve_constraints
<
point_t
>
curve_constraints_t
;
typedef
spline
::
curve_constraints
<
point6_t
>
curve_constraints6_t
;
/*** TEMPLATE SPECIALIZATION FOR PYTHON ****/
EIGENPY_DEFINE_STRUCT_ALLOCATOR_SPECIALIZATION
(
bernstein_t
)
EIGENPY_DEFINE_STRUCT_ALLOCATOR_SPECIALIZATION
(
bezier_t
)
EIGENPY_DEFINE_STRUCT_ALLOCATOR_SPECIALIZATION
(
bezier6_t
)
EIGENPY_DEFINE_STRUCT_ALLOCATOR_SPECIALIZATION
(
polynom_t
)
...
...
@@ -302,6 +306,13 @@ BOOST_PYTHON_MODULE(spline)
;
/** END spline_deriv_constraints**/
/** BEGIN bernstein polynom**/
class_
<
bernstein_t
>
(
"bernstein"
,
init
<
const
unsigned
int
,
const
unsigned
int
>
())
.
def
(
"__call__"
,
&
bernstein_t
::
operator
())
;
/** END bernstein polynom**/
/** BEGIN Bezier to polynom conversion**/
def
(
"from_bezier"
,
from_bezier
<
bezier_t
,
polynom_t
>
);
/** END Bezier to polynom conversion**/
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment