Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
curves
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jason Chemin
curves
Commits
d3ffeb3b
Commit
d3ffeb3b
authored
5 years ago
by
JasonChmn
Browse files
Options
Downloads
Patches
Plain Diff
Edit wraping from bezier to bezier3, start documentation on bezier_curve
parent
5342d9e8
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/curve/bezier_curve.h
+16
-6
16 additions, 6 deletions
include/curve/bezier_curve.h
python/curve_python.cpp
+8
-8
8 additions, 8 deletions
python/curve_python.cpp
with
24 additions
and
14 deletions
include/curve/bezier_curve.h
+
16
−
6
View file @
d3ffeb3b
...
...
@@ -42,8 +42,11 @@ struct bezier_curve : public curve_abc<Time, Numeric, Dim, Safe, Point>
/* Constructors - destructors */
public:
///\brief Constructor
///\param PointsBegin, PointsEnd : the points parametering the Bezier curve
/// \brief Constructor.
/// Given the first and last point of a control points set, automatically create the bezier curve
/// \param PointsBegin : an iterator pointing to the first element of a control point container
/// \param PointsEnd : an iterator pointing to the last element of a control point container
///
template
<
typename
In
>
bezier_curve
(
In
PointsBegin
,
In
PointsEnd
)
...
...
@@ -61,8 +64,11 @@ struct bezier_curve : public curve_abc<Time, Numeric, Dim, Safe, Point>
pts_
.
push_back
(
*
it
);
}
///\brief Constructor
///\param PointsBegin, PointsEnd : the points parametering the Bezier curve
//// \brief Constructor.
/// Given the first and last point of a control points set, automatically create the bezier curve
/// \param PointsBegin : an iterator pointing to the first element of a control point container
/// \param PointsEnd : an iterator pointing to the last element of a control point container
/// \param T : upper bound of curve parameter which is between $[0;T]$ (default $[0;1]$)
///
template
<
typename
In
>
bezier_curve
(
In
PointsBegin
,
In
PointsEnd
,
const
time_t
T
)
...
...
@@ -82,8 +88,12 @@ struct bezier_curve : public curve_abc<Time, Numeric, Dim, Safe, Point>
///\brief Constructor
///\param PointsBegin, PointsEnd : the points parametering the Bezier curve
//// \brief Constructor.
/// Given the first and last point of a control points set, automatically create the bezier curve
/// \param PointsBegin : an iterator pointing to the first element of a control point container
/// \param PointsEnd : an iterator pointing to the last element of a control point container
/// \param T : upper bound of curve parameter which is between $[0;T]$ (default $[0;1]$)
/// \param mult_T :
///
template
<
typename
In
>
bezier_curve
(
In
PointsBegin
,
In
PointsEnd
,
const
time_t
T
,
const
time_t
mult_T
)
...
...
This diff is collapsed.
Click to expand it.
python/curve_python.cpp
+
8
−
8
View file @
d3ffeb3b
...
...
@@ -76,19 +76,19 @@ Bezier* wrapBezierConstructorConstraintsTemplate(const PointList& array, const C
}
/*3D constructors */
bezier3_t
*
wrapBezierConstructor
(
const
point_list_t
&
array
)
bezier3_t
*
wrapBezierConstructor
3
(
const
point_list_t
&
array
)
{
return
wrapBezierConstructorTemplate
<
bezier3_t
,
point_list_t
,
t_point_t
>
(
array
)
;
}
bezier3_t
*
wrapBezierConstructorBounds
(
const
point_list_t
&
array
,
const
real
ub
)
bezier3_t
*
wrapBezierConstructorBounds
3
(
const
point_list_t
&
array
,
const
real
ub
)
{
return
wrapBezierConstructorTemplate
<
bezier3_t
,
point_list_t
,
t_point_t
>
(
array
,
ub
)
;
}
bezier3_t
*
wrapBezierConstructorConstraints
(
const
point_list_t
&
array
,
const
curve_constraints_t
&
constraints
)
bezier3_t
*
wrapBezierConstructor
3
Constraints
(
const
point_list_t
&
array
,
const
curve_constraints_t
&
constraints
)
{
return
wrapBezierConstructorConstraintsTemplate
<
bezier3_t
,
point_list_t
,
t_point_t
,
curve_constraints_t
>
(
array
,
constraints
)
;
}
bezier3_t
*
wrapBezierConstructorBoundsConstraints
(
const
point_list_t
&
array
,
const
curve_constraints_t
&
constraints
,
const
real
ub
)
bezier3_t
*
wrapBezierConstructorBounds
3
Constraints
(
const
point_list_t
&
array
,
const
curve_constraints_t
&
constraints
,
const
real
ub
)
{
return
wrapBezierConstructorConstraintsTemplate
<
bezier3_t
,
point_list_t
,
t_point_t
,
curve_constraints_t
>
(
array
,
constraints
,
ub
)
;
}
...
...
@@ -238,10 +238,10 @@ BOOST_PYTHON_MODULE(curves)
/** BEGIN bezier curve**/
class_
<
bezier3_t
>
(
"bezier3"
,
no_init
)
.
def
(
"__init__"
,
make_constructor
(
&
wrapBezierConstructor
))
.
def
(
"__init__"
,
make_constructor
(
&
wrapBezierConstructorBounds
))
.
def
(
"__init__"
,
make_constructor
(
&
wrapBezierConstructorConstraints
))
.
def
(
"__init__"
,
make_constructor
(
&
wrapBezierConstructorBoundsConstraints
))
.
def
(
"__init__"
,
make_constructor
(
&
wrapBezierConstructor
3
))
.
def
(
"__init__"
,
make_constructor
(
&
wrapBezierConstructorBounds
3
))
.
def
(
"__init__"
,
make_constructor
(
&
wrapBezierConstructor
3
Constraints
))
.
def
(
"__init__"
,
make_constructor
(
&
wrapBezierConstructorBounds
3
Constraints
))
.
def
(
"min"
,
&
bezier3_t
::
min
)
.
def
(
"max"
,
&
bezier3_t
::
max
)
.
def
(
"__call__"
,
&
bezier3_t
::
operator
())
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment