Subject: CGAL users discussion list
List archive
- From: Shriramana Sharma <>
- To:
- Subject: [cgal-discuss] Initializing bezier curve from list of control points
- Date: Tue, 22 Jan 2013 16:33:08 +0530
Hello.
CGAL-4.1/doc_html/cgal_manual/Boolean_set_operations_2/Chapter_main.html#Subsection_19.4.3
the documentation only shows how to initialize a Bezier curve from a
file stream using operator>>. However the operator>> for Curve_2 is
defined in CGAL-4.1/include/CGAL/Arr_geometry_traits/Bezier_curve_2.h
and it calls the constructor starting near l 353 which reads:
_Bezier_curve_2 (InputIterator pts_begin, InputIterator pts_end) :
In my program I'd like to initialize a bezier curve directly from a
vector of control pts, and not from a file. My questions:
1) Is the above constructor part of the official API so that I can
safely construct my high-level Curve_2 class (which gets redirected
via typedefs to the above _Bezier_curve_2 class) using the pair of
begin/end iterators?
2) IIUC the begin/end iterator is often used in CGAL.
2a) Is this to enable the user to select any subset of the list used for
input?
2b) Would it be possible to provide a useful overload which takes a
(const?) ref to a vector object and doesn't require the user to
manually specify the begin/end iterators?
3) (OK so this one is probably silly but well I'm relatively
inexperienced so just to be sure:) I am working with contours that can
have straight line or quadratic or cubic bezier segments. I suppose I
just input the relevant number of ctrl pts per bezier i.e. 2,3,4 and
the library will take care of the boolop calculations correctly?
Thanks!
--
Shriramana Sharma
- [cgal-discuss] Initializing bezier curve from list of control points, Shriramana Sharma, 01/22/2013
- Re: [cgal-discuss] Initializing bezier curve from list of control points, Sebastien Loriot (GeometryFactory), 01/22/2013
Archive powered by MHonArc 2.6.18.