diff --git a/.gitattributes b/.gitattributes index d714197389c..7183bf64653 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2835,6 +2835,8 @@ Point_set_processing_3/doc_tex/Point_set_processing_3/pipeline.eps -text svneol= Point_set_processing_3/doc_tex/Point_set_processing_3/pipeline.jpg -text svneol=unset#image/jpeg Point_set_processing_3/doc_tex/Point_set_processing_3/simplification.tex -text Point_set_processing_3/doc_tex/Point_set_processing_3/smoothing.tex -text +Point_set_processing_3/doc_tex/Property_map/fig/property_map.jpg -text svneol=unset#image/jpeg +Point_set_processing_3/doc_tex/Property_map/fig/property_map_detail.png -text svneol=unset#image/png Point_set_processing_3/examples/Point_set_processing_3/cgal_test_with_cmake -text Point_set_processing_3/examples/Point_set_processing_3/cgal_test_with_cmake.bat eol=crlf Point_set_processing_3/examples/Point_set_processing_3/data/ChineseDragon-10kv.off -text svneol=unset#application/octet-stream diff --git a/Point_set_processing_3/doc_tex/Point_set_processing_3/PkgDescription.tex b/Point_set_processing_3/doc_tex/Point_set_processing_3/PkgDescription.tex index 9a38a0dadee..f6488ea36c2 100644 --- a/Point_set_processing_3/doc_tex/Point_set_processing_3/PkgDescription.tex +++ b/Point_set_processing_3/doc_tex/Point_set_processing_3/PkgDescription.tex @@ -5,7 +5,7 @@ \ccPkgDependsOn{\ccThirdPartyLapack} \ccPkgIntroducedInCGAL{3.5} \ccPkgLicense{\ccLicenseQPL} -\ccPkgDemo{Poisson}{Poisson.zip} +\ccPkgDemo{Point_set}{Point_set.zip} \ccPkgIllustration{Point_set_processing_3/fig/point_set_processing_detail.png}{Point_set_processing_3/fig/point_set_processing.jpg} \end{ccPkgDescription} diff --git a/Point_set_processing_3/doc_tex/Point_set_processing_3/io.tex b/Point_set_processing_3/doc_tex/Point_set_processing_3/io.tex index 27062971bb7..447f66dedd1 100644 --- a/Point_set_processing_3/doc_tex/Point_set_processing_3/io.tex +++ b/Point_set_processing_3/doc_tex/Point_set_processing_3/io.tex @@ -1,22 +1,36 @@ \section{Input/Output} + +\subsection{Property Maps} + The algorithms of this component take as input parameters iterator ranges of 3D points, or points with normals. As the latter might be represented in various ways, e.g., as a class derived from the \cgal\ point class, or as a \ccc{std::pair, Vector_3 >}, or as a \ccc{boost::tuple<..,Point_3, ..., Vector_3 >}, the -algorithms use property maps to access the point or vector information in the input data. - -Users of this package may use other types to represent positions and normals if they implement the corresponding property maps. \\ - -We provide functions to read and write sets of points or points with normals from the following ASCII file formats: \\ -XYZ (three point coordinates \ccc{x y z} per line or three point coordinates and three normal vector coordinates \ccc{x y z nx ny nz} per line) \\ -and Object File Format (OFF)~\cite{cgal:p-gmgv16-96}. +algorithms use property maps to access the point or vector information in the input data. \\ \\ +An another component provides property maps to support these cases: \\ +\ccc{CGAL::Dereference_property_map} \\ +\ccc{CGAL::First_of_pair_property_map} and \ccc{CGAL::Second_of_pair_property_map} \\ +\ccc{CGAL::Nth_of_tuple_property_map} \\ +\\ +Users of this package may use other types to represent positions and normals if they implement the corresponding property maps. + + +\subsection{Streams} + +This component provides functions to read and write sets of points or points with normals from the following ASCII file formats: +\begin{itemize} +\item XYZ (three point coordinates \ccc{x y z} per line or three point coordinates and three normal vector coordinates \ccc{x y z nx ny nz} per line), and \\ +\item Object File Format (OFF)~\cite{cgal:p-gmgv16-96}. +\end{itemize} + \ccc{CGAL::read_xyz_points} \\ \ccc{CGAL::read_off_points} \\ \ccc{CGAL::write_off_points} \\ \ccc{CGAL::write_xyz_points} \\ -\ccExample -The following example reads a point set from an input file stream and writes it to a file stream, both in the xyz format. +\subsection{Example} + +The following example reads a point set from an input file and writes it to a file, both in the xyz format. Position and normal are stored in pairs and accessed through property maps. \ccIncludeExampleCode{Point_set_processing_3/read_write_xyz_point_set_example.cpp} \ No newline at end of file diff --git a/Point_set_processing_3/doc_tex/Property_map/PkgDescription.tex b/Point_set_processing_3/doc_tex/Property_map/PkgDescription.tex new file mode 100644 index 00000000000..7af4e394b02 --- /dev/null +++ b/Point_set_processing_3/doc_tex/Property_map/PkgDescription.tex @@ -0,0 +1,12 @@ +\begin{ccPkgDescription}{CGAL and Boost Property Maps\label{Pkg:Property_map}} +\ccPkgHowToCiteCgal{cgal:sal-pptsm2-08} +\ccPkgSummary{This package provides a framework for interfacing \cgal\ +data structures with algorithms expecting Boost Property Maps.} + +\ccPkgIntroducedInCGAL{3.5} +\ccPkgLicense{\ccLicenseQPL} +\ccPkgIllustration{Property_map/fig/property_map_detail.png}{Property_map/fig/property_map.jpg} + +\end{ccPkgDescription} + + diff --git a/Point_set_processing_3/doc_tex/Property_map/Property_map.tex b/Point_set_processing_3/doc_tex/Property_map/Property_map.tex new file mode 100644 index 00000000000..89370c4c5b4 --- /dev/null +++ b/Point_set_processing_3/doc_tex/Property_map/Property_map.tex @@ -0,0 +1,32 @@ +\section{A Short Introduction to the Boost Property Maps Library} + +The Boost Property Map Library consists mainly of interface specifications in the form of concepts. These interface specifications are intended for use by implementors of generic libraries in communicating requirements on template parameters to their users. In particular, the Boost Property Map concepts define a general purpose interface for mapping key objects to corresponding value objects, thereby hiding the details of how the mapping is implemented from algorithms. The implementation of types fulfilling the property map interface is up to the client of the algorithm to provide. + +The Boost Property Map Library also contains a few adaptors that convert commonly used data-structures that implement a mapping operation, such as builtin arrays (pointers), iterators, and std::map, to have the property map interface. + +Free functions \ccc{get} and \ccc{put} allow getting and putting information through a property map. +The data themselves may be stored in the element, or they may +be stored in an external data structure, or they may be computed on +the fly. This is an ``implementation detail'' of the particular property map. + +\smallskip +Property maps in the Boost manuals: \path|http://www.boost.org/libs/property_map/property_map.html| + + + +\section{CGAL and Boost Property Maps} + +Some algorithms in \cgal\ take as input parameters iterator ranges and property maps to access information attached to elements of the sequence. + +For example, the algorithms of chapters \ccc{Point_set_processing_3} \ref{chap:point_set_processing_3} and \ccc{Surface_reconstruction_points_3} \ref{chap:surface_reconstruction_points_3} take as input parameters iterator ranges and property maps to access each point's position and normal. +Position and normal might be represented in various ways, e.g., as a class derived from the \cgal\ point class, or as a \ccc{std::pair, Vector_3 >}, or as a \ccc{boost::tuple<..,Point_3, ..., Vector_3 >}. + +This component provides property maps to support these cases: \\ +\ccc{CGAL::Dereference_property_map} \\ +\ccc{CGAL::First_of_pair_property_map} and \ccc{CGAL::Second_of_pair_property_map} \\ +\ccc{CGAL::Nth_of_tuple_property_map} \\ + +\subsection{Example} + +The following example reads a point set from an input file and writes it to a file, both in the xyz format. Position and normal are stored in pairs and accessed through property maps. +\ccIncludeExampleCode{Point_set_processing_3/read_write_xyz_point_set_example.cpp} diff --git a/Point_set_processing_3/doc_tex/Property_map/fig/property_map.jpg b/Point_set_processing_3/doc_tex/Property_map/fig/property_map.jpg new file mode 100644 index 00000000000..415a6dbbd8c Binary files /dev/null and b/Point_set_processing_3/doc_tex/Property_map/fig/property_map.jpg differ diff --git a/Point_set_processing_3/doc_tex/Property_map/fig/property_map_detail.png b/Point_set_processing_3/doc_tex/Property_map/fig/property_map_detail.png new file mode 100644 index 00000000000..23265873d68 Binary files /dev/null and b/Point_set_processing_3/doc_tex/Property_map/fig/property_map_detail.png differ diff --git a/Point_set_processing_3/doc_tex/Property_map/main.tex b/Point_set_processing_3/doc_tex/Property_map/main.tex new file mode 100644 index 00000000000..ce2decb37ed --- /dev/null +++ b/Point_set_processing_3/doc_tex/Property_map/main.tex @@ -0,0 +1,18 @@ + +% \begingroup +% +% \newcommand{\dcel}{{\sc Dcel}} + +\ccUserChapter{CGAL and Boost Property Maps +\label{chapter-Property_map}} + +\ccChapterAuthor{Andreas Fabri \and Laurent Saboret} + +\input{Property_map/PkgDescription} + +\minitoc + +\input{Property_map/Property_map} + +% \endgroup +%% EOF diff --git a/Point_set_processing_3/doc_tex/Property_map_ref/Dereference_property_map.tex b/Point_set_processing_3/doc_tex/Property_map_ref/Dereference_property_map.tex new file mode 100644 index 00000000000..fdc6a82b15b --- /dev/null +++ b/Point_set_processing_3/doc_tex/Property_map_ref/Dereference_property_map.tex @@ -0,0 +1,140 @@ +% +------------------------------------------------------------------------+ +% | Reference manual page: Dereference_property_map.tex +% +------------------------------------------------------------------------+ +% | 16.06.2009 Pierre Alliez, Laurent Saboret, Gael Guennebaud +% | Package: Property_map +% | +\RCSdef{\RCSDereferencepropertymapRev}{$Id$} +\RCSdefDate{\RCSDereferencepropertymapDate}{$Date$} +% | +\ccRefPageBegin +%%RefPage: end of header, begin of main body +% +------------------------------------------------------------------------+ + + +\begin{ccRefClass}{Dereference_property_map} + +%% \ccHtmlCrossLink{} %% add further rules for cross referencing links +%% \ccHtmlIndexC[class]{} %% add further index entries + +\ccDefinition + +% The section below is automatically generated. Do not edit! +%START-AUTO(\ccDefinition) + +Very simple property map that converts a \ccc{T*} pointer (or in general an iterator over \ccc{T} elements) to the \ccc{T} object. + +%END-AUTO(\ccDefinition) + +% The section below is automatically generated. Do not edit! +%START-AUTO(\ccInclude) + +\ccInclude{CGAL/property_map.h} + +%END-AUTO(\ccInclude) + +\ccParameters + +% The section below is automatically generated. Do not edit! +%START-AUTO(\ccParameters) + +template$<$ \\ +typename T$>$ \\ +struct \ccc{Dereference_property_map}; + +%END-AUTO(\ccParameters) + +\ccInheritsFrom + +% The section below is automatically generated. Do not edit! +%START-AUTO(\ccInheritsFrom) + +\ccc{boost::put_get_helper} $>$ + +%END-AUTO(\ccInheritsFrom) + +\ccIsModel + +% The section below is automatically generated. Do not edit! +%START-AUTO(\ccIsModel) + +Model of \ccc{boost::LvaluePropertyMap} concept. + +%END-AUTO(\ccIsModel) + +\ccTypes + +% The section below is automatically generated. Do not edit! +%START-AUTO(\ccTypes) + +\ccNestedType{key_type} +{ +typedef to \ccc{T*} +} +\ccGlue +\ccNestedType{value_type} +{ +typedef to \ccc{T} +} +\ccGlue +\ccNestedType{reference} +{ +typedef to \ccc{T&} +} +\ccGlue +\ccNestedType{category} +{ +\ccc{boost::lvalue_property_map_tag} +} +\ccGlue + +%END-AUTO(\ccTypes) + +\ccCreation +\ccCreationVariable{pmap} + +\ccConstructor{Dereference_property_map();} +{ +Constructor. +} + +\ccOperations + +% The section below is automatically generated. Do not edit! +%START-AUTO(\ccOperations) + +\ccMethod{template reference operator[](Iter it) const;} +{ +Access a property map element. +\ccCommentHeading{Template Parameters} \\ +\ccc{Iter}: Type convertible to \ccc{key_type}. +} +\ccGlue + +%END-AUTO(\ccOperations) + +\ccHeading{Related Functions} + +% The section below is automatically generated. Do not edit! +%START-AUTO(\ccHeading{Related Functions}) + +\ccFunction{Dereference_property_map::type> make_dereference_property_map(Iter);} +{ +Free function to create a \ccc{Dereference_property_map} property map. +} +\ccGlue + +%END-AUTO(\ccHeading{Related Functions}) + +\ccExample + +See \ccc{property_map.cpp} example. + +\end{ccRefClass} + +% +------------------------------------------------------------------------+ +%%RefPage: end of main body, begin of footer +\ccRefPageEnd +% EOF +% +------------------------------------------------------------------------+ + diff --git a/Point_set_processing_3/doc_tex/Property_map_ref/First_of_pair_property_map.tex b/Point_set_processing_3/doc_tex/Property_map_ref/First_of_pair_property_map.tex new file mode 100644 index 00000000000..e4d8cd19ad2 --- /dev/null +++ b/Point_set_processing_3/doc_tex/Property_map_ref/First_of_pair_property_map.tex @@ -0,0 +1,147 @@ +% +------------------------------------------------------------------------+ +% | Reference manual page: First_of_pair_property_map.tex +% +------------------------------------------------------------------------+ +% | 16.06.2009 Pierre Alliez, Laurent Saboret, Gael Guennebaud +% | Package: Property_map +% | +\RCSdef{\RCSFirstofpairpropertymapRev}{$Id$} +\RCSdefDate{\RCSFirstofpairpropertymapDate}{$Date$} +% | +\ccRefPageBegin +%%RefPage: end of header, begin of main body +% +------------------------------------------------------------------------+ + + +\begin{ccRefClass}{First_of_pair_property_map} + +%% \ccHtmlCrossLink{} %% add further rules for cross referencing links +%% \ccHtmlIndexC[class]{} %% add further index entries + +\ccDefinition + +% The section below is automatically generated. Do not edit! +%START-AUTO(\ccDefinition) + +Property map that accesses the first item of a \ccc{std::pair} Pair from a Pair$\ast$ pointer (or in general an iterator over Pair elements). + +%END-AUTO(\ccDefinition) + +% The section below is automatically generated. Do not edit! +%START-AUTO(\ccInclude) + +\ccInclude{CGAL/property_map.h} + +%END-AUTO(\ccInclude) + +\ccParameters + +% The section below is automatically generated. Do not edit! +%START-AUTO(\ccParameters) + +template$<$ \\ +typename Pair$>$ \\ +struct \ccc{First_of_pair_property_map}; + +\ccCommentHeading{Parameters} \\ +\ccc{Pair}: Instance of \ccc{std::pair}. + +%END-AUTO(\ccParameters) + +\ccInheritsFrom + +% The section below is automatically generated. Do not edit! +%START-AUTO(\ccInheritsFrom) + +\ccc{boost::put_get_helper} $>$ + +%END-AUTO(\ccInheritsFrom) + +\ccIsModel + +% The section below is automatically generated. Do not edit! +%START-AUTO(\ccIsModel) + +Model of \ccc{boost::LvaluePropertyMap} concept. + +%END-AUTO(\ccIsModel) + +\ccTypes + +% The section below is automatically generated. Do not edit! +%START-AUTO(\ccTypes) + +\ccNestedType{key_type} +{ +typedef to \ccc{Pair*} +} +\ccGlue +\ccNestedType{value_type} +{ +typedef to \ccc{Pair::first_type} +} +\ccGlue +\ccNestedType{reference} +{ +typedef to \ccc{value_type}\& +} +\ccGlue +\ccNestedType{category} +{ +\ccc{boost::lvalue_property_map_tag} +} +\ccGlue + +%END-AUTO(\ccTypes) + +\ccCreation +\ccCreationVariable{pmap} + +\ccConstructor{First_of_pair_property_map();} +{ +Constructor. +} + +\ccOperations + +% The section below is automatically generated. Do not edit! +%START-AUTO(\ccOperations) + +\ccMethod{template reference operator[](Iter pair) const;} +{ +Access a property map element. +\ccCommentHeading{Template Parameters} \\ +\ccc{Iter}: Type convertible to \ccc{key_type}. +} +\ccGlue + +%END-AUTO(\ccOperations) + +\ccHeading{Related Functions} + +% The section below is automatically generated. Do not edit! +%START-AUTO(\ccHeading{Related Functions}) + +\ccFunction{First_of_pair_property_map::type> make_first_of_pair_property_map(Iter);} +{ +Free function to create a \ccc{First_of_pair_property_map} property map. +} +\ccGlue + +%END-AUTO(\ccHeading{Related Functions}) + +\ccSeeAlso + +\ccRefIdfierPage{CGAL::Second_of_pair_property_map} \\ + +\ccExample + +See \ccc{property_map.cpp} example. + +\end{ccRefClass} + +% +------------------------------------------------------------------------+ +%%RefPage: end of main body, begin of footer +\ccRefPageEnd +% EOF +% +------------------------------------------------------------------------+ + diff --git a/Point_set_processing_3/doc_tex/Property_map_ref/Nth_of_tuple_property_map.tex b/Point_set_processing_3/doc_tex/Property_map_ref/Nth_of_tuple_property_map.tex new file mode 100644 index 00000000000..e93bf228621 --- /dev/null +++ b/Point_set_processing_3/doc_tex/Property_map_ref/Nth_of_tuple_property_map.tex @@ -0,0 +1,143 @@ +% +------------------------------------------------------------------------+ +% | Reference manual page: Nth_of_tuple_property_map.tex +% +------------------------------------------------------------------------+ +% | 16.06.2009 Pierre Alliez, Laurent Saboret, Gael Guennebaud +% | Package: Property_map +% | +\RCSdef{\RCSNthoftuplepropertymapRev}{$Id$} +\RCSdefDate{\RCSNthoftuplepropertymapDate}{$Date$} +% | +\ccRefPageBegin +%%RefPage: end of header, begin of main body +% +------------------------------------------------------------------------+ + + +\begin{ccRefClass}{Nth_of_tuple_property_map} + +%% \ccHtmlCrossLink{} %% add further rules for cross referencing links +%% \ccHtmlIndexC[class]{} %% add further index entries + +\ccDefinition + +% The section below is automatically generated. Do not edit! +%START-AUTO(\ccDefinition) + +Property map that accesses the Nth item of a \ccc{boost::tuple} Tuple from a Tuple$\ast$ pointer (or in general an iterator over Tuple elements). + +%END-AUTO(\ccDefinition) + +% The section below is automatically generated. Do not edit! +%START-AUTO(\ccInclude) + +\ccInclude{CGAL/property_map.h} + +%END-AUTO(\ccInclude) + +\ccParameters + +% The section below is automatically generated. Do not edit! +%START-AUTO(\ccParameters) + +template$<$int N, \\ +typename Tuple$>$ \\ +struct \ccc{Nth_of_tuple_property_map}; + +\ccCommentHeading{Parameters} \\ +\ccc{Index}: of the item to access. \ccc{Tuple}: Instance of \ccc{boost::tuple}. + +%END-AUTO(\ccParameters) + +\ccInheritsFrom + +% The section below is automatically generated. Do not edit! +%START-AUTO(\ccInheritsFrom) + +\ccc{boost::put_get_helper::type}\& , \ccc{Nth_of_tuple_property_map} $>$ + +%END-AUTO(\ccInheritsFrom) + +\ccIsModel + +% The section below is automatically generated. Do not edit! +%START-AUTO(\ccIsModel) + +Model of \ccc{boost::LvaluePropertyMap} concept. + +%END-AUTO(\ccIsModel) + +\ccTypes + +% The section below is automatically generated. Do not edit! +%START-AUTO(\ccTypes) + +\ccNestedType{key_type} +{ +typedef to \ccc{Tuple*} +} +\ccGlue +\ccNestedType{value_type} +{ +typedef to \ccc{boost::tuples::element::type} +} +\ccGlue +\ccNestedType{reference} +{ +typedef to \ccc{value_type}\& +} +\ccGlue +\ccNestedType{category} +{ +\ccc{boost::lvalue_property_map_tag} +} +\ccGlue + +%END-AUTO(\ccTypes) + +\ccCreation +\ccCreationVariable{pmap} + +\ccConstructor{Nth_of_tuple_property_map();} +{ +Constructor. +} + +\ccOperations + +% The section below is automatically generated. Do not edit! +%START-AUTO(\ccOperations) + +\ccMethod{template reference operator[](Iter tuple) const;} +{ +Access a property map element. +\ccCommentHeading{Template Parameters} \\ +\ccc{Iter}: Type convertible to \ccc{key_type}. +} +\ccGlue + +%END-AUTO(\ccOperations) + +\ccHeading{Related Functions} + +% The section below is automatically generated. Do not edit! +%START-AUTO(\ccHeading{Related Functions}) + +\ccFunction{Nth_of_tuple_property_map::type> make_nth_of_tuple_property_map(Iter);} +{ +Free function to create a \ccc{Nth_of_tuple_property_map} property map. +} +\ccGlue + +%END-AUTO(\ccHeading{Related Functions}) + +\ccExample + +See \ccc{property_map.cpp} example. + +\end{ccRefClass} + +% +------------------------------------------------------------------------+ +%%RefPage: end of main body, begin of footer +\ccRefPageEnd +% EOF +% +------------------------------------------------------------------------+ + diff --git a/Point_set_processing_3/doc_tex/Property_map_ref/Second_of_pair_property_map.tex b/Point_set_processing_3/doc_tex/Property_map_ref/Second_of_pair_property_map.tex new file mode 100644 index 00000000000..a273e24e0a2 --- /dev/null +++ b/Point_set_processing_3/doc_tex/Property_map_ref/Second_of_pair_property_map.tex @@ -0,0 +1,147 @@ +% +------------------------------------------------------------------------+ +% | Reference manual page: Second_of_pair_property_map.tex +% +------------------------------------------------------------------------+ +% | 16.06.2009 Pierre Alliez, Laurent Saboret, Gael Guennebaud +% | Package: Property_map +% | +\RCSdef{\RCSSecondofpairpropertymapRev}{$Id$} +\RCSdefDate{\RCSSecondofpairpropertymapDate}{$Date$} +% | +\ccRefPageBegin +%%RefPage: end of header, begin of main body +% +------------------------------------------------------------------------+ + + +\begin{ccRefClass}{Second_of_pair_property_map} + +%% \ccHtmlCrossLink{} %% add further rules for cross referencing links +%% \ccHtmlIndexC[class]{} %% add further index entries + +\ccDefinition + +% The section below is automatically generated. Do not edit! +%START-AUTO(\ccDefinition) + +Property map that accesses the second item of a \ccc{std::pair} Pair from a Pair$\ast$ pointer (or in general an iterator over Pair elements). + +%END-AUTO(\ccDefinition) + +% The section below is automatically generated. Do not edit! +%START-AUTO(\ccInclude) + +\ccInclude{CGAL/property_map.h} + +%END-AUTO(\ccInclude) + +\ccParameters + +% The section below is automatically generated. Do not edit! +%START-AUTO(\ccParameters) + +template$<$ \\ +typename Pair$>$ \\ +struct \ccc{Second_of_pair_property_map}; + +\ccCommentHeading{Parameters} \\ +\ccc{Pair}: Instance of \ccc{std::pair}. + +%END-AUTO(\ccParameters) + +\ccInheritsFrom + +% The section below is automatically generated. Do not edit! +%START-AUTO(\ccInheritsFrom) + +\ccc{boost::put_get_helper} $>$ + +%END-AUTO(\ccInheritsFrom) + +\ccIsModel + +% The section below is automatically generated. Do not edit! +%START-AUTO(\ccIsModel) + +Model of \ccc{boost::LvaluePropertyMap} concept. + +%END-AUTO(\ccIsModel) + +\ccTypes + +% The section below is automatically generated. Do not edit! +%START-AUTO(\ccTypes) + +\ccNestedType{key_type} +{ +typedef to \ccc{Pair*} +} +\ccGlue +\ccNestedType{value_type} +{ +typedef to \ccc{Pair::second_type} +} +\ccGlue +\ccNestedType{reference} +{ +typedef to \ccc{value_type}\& +} +\ccGlue +\ccNestedType{category} +{ +\ccc{boost::lvalue_property_map_tag} +} +\ccGlue + +%END-AUTO(\ccTypes) + +\ccCreation +\ccCreationVariable{pmap} + +\ccConstructor{Second_of_pair_property_map();} +{ +Constructor. +} + +\ccOperations + +% The section below is automatically generated. Do not edit! +%START-AUTO(\ccOperations) + +\ccMethod{template reference operator[](Iter pair) const;} +{ +Access a property map element. +\ccCommentHeading{Template Parameters} \\ +\ccc{Iter}: Type convertible to \ccc{key_type}. +} +\ccGlue + +%END-AUTO(\ccOperations) + +\ccHeading{Related Functions} + +% The section below is automatically generated. Do not edit! +%START-AUTO(\ccHeading{Related Functions}) + +\ccFunction{Second_of_pair_property_map::type> make_second_of_pair_property_map(Iter);} +{ +Free function to create a \ccc{Second_of_pair_property_map} property map. +} +\ccGlue + +%END-AUTO(\ccHeading{Related Functions}) + +\ccSeeAlso + +\ccRefIdfierPage{CGAL::First_of_pair_property_map} \\ + +\ccExample + +See \ccc{property_map.cpp} example. + +\end{ccRefClass} + +% +------------------------------------------------------------------------+ +%%RefPage: end of main body, begin of footer +\ccRefPageEnd +% EOF +% +------------------------------------------------------------------------+ + diff --git a/Point_set_processing_3/doc_tex/Property_map_ref/intro.tex b/Point_set_processing_3/doc_tex/Property_map_ref/intro.tex new file mode 100644 index 00000000000..d3fbc906e64 --- /dev/null +++ b/Point_set_processing_3/doc_tex/Property_map_ref/intro.tex @@ -0,0 +1,26 @@ +% +------------------------------------------------------------------------+ +% | Reference manual page: Property_map/intro.tex +% +------------------------------------------------------------------------+ +% | 06.16.2009 Andreas Fabri, Laurent Saboret +% | Package: Property_map +% | +% | +% +------------------------------------------------------------------------+ + +\ccRefChapter{CGAL and Boost Property Maps +\label{ref-chapter-Property_map}} + +\ccChapterAuthor{Andreas Fabri \and Laurent Saboret} + +This package provides a framework for interfacing \cgal\ +data structures with algorithms expecting Boost Property Maps. + +\section{Classified Reference Pages} + +\ccHeading{Classes} + +\ccRefIdfierPage{CGAL::Dereference_property_map} \\ +\ccRefIdfierPage{CGAL::First_of_pair_property_map} \\ +\ccRefIdfierPage{CGAL::Second_of_pair_property_map} \\ +\ccRefIdfierPage{CGAL::Nth_of_tuple_property_map} \\ + diff --git a/Point_set_processing_3/doc_tex/Property_map_ref/main.tex b/Point_set_processing_3/doc_tex/Property_map_ref/main.tex new file mode 100644 index 00000000000..5bc26b8029b --- /dev/null +++ b/Point_set_processing_3/doc_tex/Property_map_ref/main.tex @@ -0,0 +1,15 @@ +% +------------------------------------------------------------------------+ +% | CBP Reference Manual: main.tex +% +------------------------------------------------------------------------+ +% | Automatically generated driver file for the reference manual chapter +% | of this package. Do not edit manually, you may loose your changes. +% +------------------------------------------------------------------------+ + +\input{Property_map_ref/intro.tex} + +\input{Property_map_ref/Dereference_property_map.tex} +\input{Property_map_ref/First_of_pair_property_map.tex} +\input{Property_map_ref/Nth_of_tuple_property_map.tex} +\input{Property_map_ref/Second_of_pair_property_map.tex} + +%% EOF diff --git a/Point_set_processing_3/examples/Point_set_processing_3/normal_estimation.cpp b/Point_set_processing_3/examples/Point_set_processing_3/normal_estimation.cpp index 43ed97f93be..5e6b46e6c93 100644 --- a/Point_set_processing_3/examples/Point_set_processing_3/normal_estimation.cpp +++ b/Point_set_processing_3/examples/Point_set_processing_3/normal_estimation.cpp @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include #include @@ -68,7 +68,7 @@ void run_pca_estimate_normals(PointList& points, // input points + output normal // + property maps to access each point's position and normal. // The position property map can be omitted here as we use iterators over Point_3 elements. CGAL::pca_estimate_normals(points.begin(), points.end(), - CGAL::make_normal_vector_property_map(points.begin()), + CGAL::make_normal_of_point_with_normal_pmap(points.begin()), nb_neighbors); long memory = CGAL::Memory_sizer().virtual_size(); @@ -98,7 +98,7 @@ void run_jet_estimate_normals(PointList& points, // input points + output normal // + property maps to access each point's position and normal. // The position property map can be omitted here as we use iterators over Point_3 elements. CGAL::jet_estimate_normals(points.begin(), points.end(), - CGAL::make_normal_vector_property_map(points.begin()), + CGAL::make_normal_of_point_with_normal_pmap(points.begin()), nb_neighbors); long memory = CGAL::Memory_sizer().virtual_size(); @@ -120,7 +120,7 @@ void run_mst_orient_normals(PointList& points, // input points + input/output no // The position property map can be omitted here as we use iterators over Point_3 elements. PointList::iterator unoriented_points_begin = CGAL::mst_orient_normals(points.begin(), points.end(), - CGAL::make_normal_vector_property_map(points.begin()), + CGAL::make_normal_of_point_with_normal_pmap(points.begin()), nb_neighbors_mst); // Optional: delete points with an unoriented normal @@ -292,7 +292,7 @@ int main(int argc, char * argv[]) if (!stream || !CGAL::write_xyz_points_and_normals(stream, points.begin(), points.end(), - CGAL::make_normal_vector_property_map(points.begin()))) + CGAL::make_normal_of_point_with_normal_pmap(points.begin()))) { std::cerr << "Error: cannot write file " << output_filename << std::endl; return EXIT_FAILURE; diff --git a/Point_set_processing_3/examples/Point_set_processing_3/normals_example.cpp b/Point_set_processing_3/examples/Point_set_processing_3/normals_example.cpp index f322226e38b..7631d84d12e 100644 --- a/Point_set_processing_3/examples/Point_set_processing_3/normals_example.cpp +++ b/Point_set_processing_3/examples/Point_set_processing_3/normals_example.cpp @@ -2,7 +2,7 @@ #include #include #include -#include +#include #include #include @@ -30,7 +30,7 @@ int main(void) // The position property map can be omitted here as we use iterators over Point_3 elements. const int nb_neighbors = 7; // K-nearest neighbors CGAL::pca_estimate_normals(points.begin(), points.end(), - CGAL::make_normal_vector_property_map(points.begin()), + CGAL::make_normal_of_point_with_normal_pmap(points.begin()), nb_neighbors); // Orients normals. @@ -39,7 +39,7 @@ int main(void) // The position property map can be omitted here as we use iterators over Point_3 elements. std::list::iterator unoriented_points_begin = CGAL::mst_orient_normals(points.begin(), points.end(), - CGAL::make_normal_vector_property_map(points.begin()), + CGAL::make_normal_of_point_with_normal_pmap(points.begin()), nb_neighbors); // Optional: delete points with an unoriented normal diff --git a/Point_set_processing_3/examples/Point_set_processing_3/property_map.cpp b/Point_set_processing_3/examples/Point_set_processing_3/property_map.cpp index 8d5372c1f08..aa2e292ea55 100644 --- a/Point_set_processing_3/examples/Point_set_processing_3/property_map.cpp +++ b/Point_set_processing_3/examples/Point_set_processing_3/property_map.cpp @@ -7,7 +7,7 @@ // Usage: no parameters #include -#include +#include #include #include #include diff --git a/Point_set_processing_3/examples/Point_set_processing_3/read_write_xyz_point_set_example.cpp b/Point_set_processing_3/examples/Point_set_processing_3/read_write_xyz_point_set_example.cpp index 809d55886de..906a5cbb762 100644 --- a/Point_set_processing_3/examples/Point_set_processing_3/read_write_xyz_point_set_example.cpp +++ b/Point_set_processing_3/examples/Point_set_processing_3/read_write_xyz_point_set_example.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include diff --git a/Point_set_processing_3/include/CGAL/IO/read_off_points.h b/Point_set_processing_3/include/CGAL/IO/read_off_points.h index bc4590fa1b2..0e20087d453 100644 --- a/Point_set_processing_3/include/CGAL/IO/read_off_points.h +++ b/Point_set_processing_3/include/CGAL/IO/read_off_points.h @@ -19,7 +19,7 @@ #ifndef CGAL_READ_OFF_POINTS_H #define CGAL_READ_OFF_POINTS_H -#include +#include #include #include diff --git a/Point_set_processing_3/include/CGAL/IO/read_xyz_points.h b/Point_set_processing_3/include/CGAL/IO/read_xyz_points.h index fdb92d6a5d6..ffecaca5e74 100644 --- a/Point_set_processing_3/include/CGAL/IO/read_xyz_points.h +++ b/Point_set_processing_3/include/CGAL/IO/read_xyz_points.h @@ -19,7 +19,7 @@ #ifndef CGAL_READ_XYZ_POINTS_H #define CGAL_READ_XYZ_POINTS_H -#include +#include #include #include diff --git a/Point_set_processing_3/include/CGAL/IO/write_off_points.h b/Point_set_processing_3/include/CGAL/IO/write_off_points.h index 44b13c72839..4af89f33a12 100644 --- a/Point_set_processing_3/include/CGAL/IO/write_off_points.h +++ b/Point_set_processing_3/include/CGAL/IO/write_off_points.h @@ -19,7 +19,7 @@ #ifndef CGAL_WRITE_OFF_POINTS_H #define CGAL_WRITE_OFF_POINTS_H -#include +#include #include #include diff --git a/Point_set_processing_3/include/CGAL/IO/write_xyz_points.h b/Point_set_processing_3/include/CGAL/IO/write_xyz_points.h index ee5d48a2207..714ce733347 100644 --- a/Point_set_processing_3/include/CGAL/IO/write_xyz_points.h +++ b/Point_set_processing_3/include/CGAL/IO/write_xyz_points.h @@ -19,7 +19,7 @@ #ifndef CGAL_WRITE_XYZ_POINTS_H #define CGAL_WRITE_XYZ_POINTS_H -#include +#include #include #include diff --git a/Point_set_processing_3/include/CGAL/Point_with_normal_3.h b/Point_set_processing_3/include/CGAL/Point_with_normal_3.h index 824a532765b..1d258fac74c 100644 --- a/Point_set_processing_3/include/CGAL/Point_with_normal_3.h +++ b/Point_set_processing_3/include/CGAL/Point_with_normal_3.h @@ -23,6 +23,9 @@ #include #include #include +#include + +#include CGAL_BEGIN_NAMESPACE @@ -114,6 +117,54 @@ private: }; +//========================================================================= + + +/// Property map that accesses the normal vector from a Point_with_normal_3* pointer +/// (or in general an iterator over Point_with_normal_3 elements). +/// +/// @heading Is Model for the Concepts: +/// Model of boost::LvaluePropertyMap concept. +/// +/// @heading Parameters: +/// @param Gt Geometric traits class. + +template +struct Normal_of_point_with_normal_pmap + : public boost::put_get_helper > +{ + typedef Point_with_normal_3 Point_with_normal; ///< Position + normal + typedef typename Gt::Vector_3 Vector; /// normal + + typedef Point_with_normal* key_type; + typedef Vector value_type; + typedef value_type& reference; + typedef boost::lvalue_property_map_tag category; + + /// Access a property map element. + /// + /// @commentheading Template Parameters: + /// @param Iter Type convertible to key_type. + template + reference operator[](Iter it) const { return (reference) it->normal(); } +}; + +/// Free function to create a Normal_of_point_with_normal_pmap property map. +/// +/// @relates Normal_of_point_with_normal_pmap + +template // Type convertible to key_type +Normal_of_point_with_normal_pmap::type>::Kernel> +make_normal_of_point_with_normal_pmap(Iter) +{ + // value_type_traits is a workaround as back_insert_iterator's value_type is void + typedef typename CGAL::value_type_traits::type Value_type; + typedef typename CGAL::Kernel_traits::Kernel Kernel; + return Normal_of_point_with_normal_pmap(); +} + + CGAL_END_NAMESPACE diff --git a/Point_set_processing_3/include/CGAL/compute_average_spacing.h b/Point_set_processing_3/include/CGAL/compute_average_spacing.h index a6b1f10df22..d808584676a 100644 --- a/Point_set_processing_3/include/CGAL/compute_average_spacing.h +++ b/Point_set_processing_3/include/CGAL/compute_average_spacing.h @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include diff --git a/Point_set_processing_3/include/CGAL/grid_simplify_point_set.h b/Point_set_processing_3/include/CGAL/grid_simplify_point_set.h index 08eb5e099f0..97ae453c6e4 100644 --- a/Point_set_processing_3/include/CGAL/grid_simplify_point_set.h +++ b/Point_set_processing_3/include/CGAL/grid_simplify_point_set.h @@ -19,7 +19,7 @@ #ifndef CGAL_GRID_SIMPLIFY_POINT_SET_H #define CGAL_GRID_SIMPLIFY_POINT_SET_H -#include +#include #include #include diff --git a/Point_set_processing_3/include/CGAL/improved_jet_smooth_point_set.h b/Point_set_processing_3/include/CGAL/improved_jet_smooth_point_set.h index 90f74ac6e25..e8f2ca6ab44 100644 --- a/Point_set_processing_3/include/CGAL/improved_jet_smooth_point_set.h +++ b/Point_set_processing_3/include/CGAL/improved_jet_smooth_point_set.h @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include diff --git a/Point_set_processing_3/include/CGAL/jet_estimate_normals.h b/Point_set_processing_3/include/CGAL/jet_estimate_normals.h index 54d000415ea..8919ab2ad2f 100644 --- a/Point_set_processing_3/include/CGAL/jet_estimate_normals.h +++ b/Point_set_processing_3/include/CGAL/jet_estimate_normals.h @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include diff --git a/Point_set_processing_3/include/CGAL/jet_smooth_point_set.h b/Point_set_processing_3/include/CGAL/jet_smooth_point_set.h index 2729c3c3fc0..f70279285a9 100644 --- a/Point_set_processing_3/include/CGAL/jet_smooth_point_set.h +++ b/Point_set_processing_3/include/CGAL/jet_smooth_point_set.h @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include diff --git a/Point_set_processing_3/include/CGAL/mst_orient_normals.h b/Point_set_processing_3/include/CGAL/mst_orient_normals.h index fcf1f15f453..cb61bf37fb3 100644 --- a/Point_set_processing_3/include/CGAL/mst_orient_normals.h +++ b/Point_set_processing_3/include/CGAL/mst_orient_normals.h @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/Point_set_processing_3/include/CGAL/pca_estimate_normals.h b/Point_set_processing_3/include/CGAL/pca_estimate_normals.h index ad909f3ff29..28622ae93ca 100644 --- a/Point_set_processing_3/include/CGAL/pca_estimate_normals.h +++ b/Point_set_processing_3/include/CGAL/pca_estimate_normals.h @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include diff --git a/Point_set_processing_3/include/CGAL/pca_smooth_point_set.h b/Point_set_processing_3/include/CGAL/pca_smooth_point_set.h index a7114ece61e..baba79374ed 100644 --- a/Point_set_processing_3/include/CGAL/pca_smooth_point_set.h +++ b/Point_set_processing_3/include/CGAL/pca_smooth_point_set.h @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include diff --git a/Point_set_processing_3/include/CGAL/point_set_property_map.h b/Point_set_processing_3/include/CGAL/point_set_property_map.h deleted file mode 100644 index 81be37daf21..00000000000 --- a/Point_set_processing_3/include/CGAL/point_set_property_map.h +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright (c) 2008-2009 GeometryFactory and INRIA -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org); you may redistribute it under -// the terms of the Q Public License version 1.0. -// See the file LICENSE.QPL distributed with CGAL. -// -// Licensees holding a valid commercial license may use this file in -// accordance with the commercial license agreement provided with the software. -// -// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -// -// $URL$ -// $Id$ -// -// Author(s) : Andreas Fabri and laurent Saboret - -#ifndef CGAL_POINT_SET_PROPERTY_MAP_H -#define CGAL_POINT_SET_PROPERTY_MAP_H - -#include -#include - -#include -#include - -#include // defines std::pair - -namespace CGAL { - - - //========================================================================= - /// Property map T* -> T. - /// A common usage is a property map Point_with_normal_3* -> position (Point_3). - - template - struct Dereference_property_map - : public boost::put_get_helper > - { - typedef T* key_type; - typedef T value_type; - typedef value_type& reference; - typedef boost::lvalue_property_map_tag category; - - /// Access the map elements. - template // Type convertible to key_type - reference operator[](Iter it) const { return reference(*it); } - }; - - /// Free function to create a Dereference_property_map property map - template // Type convertible to key_type - Dereference_property_map::type> - make_dereference_property_map(Iter) - { - // value_type_traits is a workaround as back_insert_iterator's value_type is void - return Dereference_property_map::type>(); - } - - - //========================================================================= - /// Property map Point_with_normal_3* -> normal vector (Vector_3) - - template - struct Normal_vector_property_map - : public boost::put_get_helper > - { - typedef Point_with_normal_3 Point_with_normal; ///< Position + normal - typedef typename Gt::Vector_3 Vector; /// normal - - typedef Point_with_normal* key_type; - typedef Vector value_type; - typedef value_type& reference; - typedef boost::lvalue_property_map_tag category; - - /// Access the map elements. - template // Type convertible to key_type - reference operator[](Iter it) const { return (reference) it->normal(); } - }; - - /// Free function to create a Normal_vector_property_map property map - template // Type convertible to key_type - Normal_vector_property_map::type>::Kernel> - make_normal_vector_property_map(Iter) - { - // value_type_traits is a workaround as back_insert_iterator's value_type is void - typedef typename CGAL::value_type_traits::type Value_type; - typedef typename CGAL::Kernel_traits::Kernel Kernel; - return Normal_vector_property_map(); - } - - - //========================================================================= - // Property maps Pair* -> Pair::first_type - // and Pair* -> Pair::second_type. - - /// Property map Pair* -> Pair::first_type - template - struct First_of_pair_property_map - : public boost::put_get_helper > - { - typedef Pair* key_type; - typedef typename Pair::first_type value_type; - typedef value_type& reference; - typedef boost::lvalue_property_map_tag category; - - /// Access the map elements. - template // Type convertible to key_type - reference operator[](Iter pair) const { return reference(pair->first); } - }; - - /// Free function to create a First_of_pair_property_map property map - template // Type convertible to key_type - First_of_pair_property_map::type> - make_first_of_pair_property_map(Iter) - { - // value_type_traits is a workaround as back_insert_iterator's value_type is void - return First_of_pair_property_map::type>(); - } - - /// Property map Pair* -> Pair::second_type - template - struct Second_of_pair_property_map - : public boost::put_get_helper > - { - typedef Pair* key_type; - typedef typename Pair::second_type value_type; - typedef value_type& reference; - typedef boost::lvalue_property_map_tag category; - - /// Access the map elements. - template // Type convertible to key_type - reference operator[](Iter pair) const { return reference(pair->second); } - }; - - /// Free function to create a Second_of_pair_property_map property map - template // Type convertible to key_type - Second_of_pair_property_map::type> - make_second_of_pair_property_map(Iter) - { - // value_type_traits is a workaround as back_insert_iterator's value_type is void - return Second_of_pair_property_map::type>(); - } - - - //========================================================================= - /// Property map Tuple* -> Nth element of tuple - - template - struct Nth_of_tuple_property_map - : public boost::put_get_helper::type&, - Nth_of_tuple_property_map > - { - typedef Tuple* key_type; - typedef typename boost::tuples::element::type value_type; - typedef value_type& reference; - typedef boost::lvalue_property_map_tag category; - - /// Access the map elements. - template // Type convertible to key_type - reference operator[](Iter tuple) const { return (reference) tuple->get(); } - }; - - /// Free function to create a Nth_of_tuple_property_map property map - template // Type convertible to key_type - Nth_of_tuple_property_map::type> - make_nth_of_tuple_property_map(Iter) - { - // value_type_traits is a workaround as back_insert_iterator's value_type is void - return Nth_of_tuple_property_map::type>(); - } - - -} // namespace CGAL - -#endif // CGAL_POINT_SET_PROPERTY_MAP_H diff --git a/Point_set_processing_3/include/CGAL/property_map.h b/Point_set_processing_3/include/CGAL/property_map.h new file mode 100644 index 00000000000..324c3de6bf3 --- /dev/null +++ b/Point_set_processing_3/include/CGAL/property_map.h @@ -0,0 +1,197 @@ +// Copyright (c) 2008-2009 GeometryFactory and INRIA +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org); you may redistribute it under +// the terms of the Q Public License version 1.0. +// See the file LICENSE.QPL distributed with CGAL. +// +// Licensees holding a valid commercial license may use this file in +// accordance with the commercial license agreement provided with the software. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +// +// $URL$ +// $Id$ +// +// Author(s) : Andreas Fabri and Laurent Saboret + +#ifndef CGAL_POINT_SET_PROPERTY_MAP_H +#define CGAL_POINT_SET_PROPERTY_MAP_H + +#include + +#include +#include + +#include // defines std::pair + +namespace CGAL { + + +/// Very simple property map that converts a 'T*' pointer (or in general +/// an iterator over 'T' elements) to the 'T' object. +/// +/// @heading Is Model for the Concepts: +/// Model of boost::LvaluePropertyMap concept. + +template +struct Dereference_property_map + : public boost::put_get_helper > +{ + typedef T* key_type; ///< typedef to 'T*' + typedef T value_type; ///< typedef to 'T' + typedef value_type& reference; ///< typedef to 'T&' + typedef boost::lvalue_property_map_tag category; ///< boost::lvalue_property_map_tag + + /// Access a property map element. + /// + /// @commentheading Template Parameters: + /// @param Iter Type convertible to key_type. + template + reference operator[](Iter it) const { return reference(*it); } +}; + +/// Free function to create a Dereference_property_map property map. +/// +/// @relates Dereference_property_map + +template // Type convertible to key_type +Dereference_property_map::type> +make_dereference_property_map(Iter) +{ + // value_type_traits is a workaround as back_insert_iterator's value_type is void + return Dereference_property_map::type>(); +} + + +//========================================================================= + +// Property maps Pair* -> Pair::first_type +// and Pair* -> Pair::second_type. + +/// Property map that accesses the first item of a std::pair Pair +/// from a Pair* pointer (or in general an iterator over Pair elements). +/// +/// @heading Is Model for the Concepts: +/// Model of boost::LvaluePropertyMap concept. +/// +/// @heading Parameters: +/// @param Pair Instance of std::pair. + +template +struct First_of_pair_property_map + : public boost::put_get_helper > +{ + typedef Pair* key_type; ///< typedef to 'Pair*' + typedef typename Pair::first_type value_type; ///< typedef to Pair::first_type + typedef value_type& reference; ///< typedef to value_type& + typedef boost::lvalue_property_map_tag category; ///< boost::lvalue_property_map_tag + + /// Access a property map element. + /// + /// @commentheading Template Parameters: + /// @param Iter Type convertible to key_type. + template + reference operator[](Iter pair) const { return reference(pair->first); } +}; + +/// Free function to create a First_of_pair_property_map property map. +/// +/// @relates First_of_pair_property_map + +template // Type convertible to key_type +First_of_pair_property_map::type> +make_first_of_pair_property_map(Iter) +{ + // value_type_traits is a workaround as back_insert_iterator's value_type is void + return First_of_pair_property_map::type>(); +} + +/// Property map that accesses the second item of a std::pair Pair +/// from a Pair* pointer (or in general an iterator over Pair elements). +/// +/// @heading Is Model for the Concepts: +/// Model of boost::LvaluePropertyMap concept. +/// +/// @heading Parameters: +/// @param Pair Instance of std::pair. + +template +struct Second_of_pair_property_map + : public boost::put_get_helper > +{ + typedef Pair* key_type; ///< typedef to 'Pair*' + typedef typename Pair::second_type value_type; ///< typedef to Pair::second_type + typedef value_type& reference; ///< typedef to value_type& + typedef boost::lvalue_property_map_tag category; ///< boost::lvalue_property_map_tag + + /// Access a property map element. + /// + /// @commentheading Template Parameters: + /// @param Iter Type convertible to key_type. + template + reference operator[](Iter pair) const { return reference(pair->second); } +}; + +/// Free function to create a Second_of_pair_property_map property map. +/// +/// @relates Second_of_pair_property_map + +template // Type convertible to key_type +Second_of_pair_property_map::type> +make_second_of_pair_property_map(Iter) +{ + // value_type_traits is a workaround as back_insert_iterator's value_type is void + return Second_of_pair_property_map::type>(); +} + + +//========================================================================= + + +/// Property map that accesses the Nth item of a boost::tuple Tuple +/// from a Tuple* pointer (or in general an iterator over Tuple elements). +/// +/// @heading Is Model for the Concepts: +/// Model of boost::LvaluePropertyMap concept. +/// +/// @heading Parameters: +/// @param Index of the item to access. +/// @param Tuple Instance of boost::tuple. + +template +struct Nth_of_tuple_property_map + : public boost::put_get_helper::type&, + Nth_of_tuple_property_map > +{ + typedef Tuple* key_type; ///< typedef to 'Tuple*' + typedef typename boost::tuples::element::type value_type; ///< typedef to boost::tuples::element::type + typedef value_type& reference; ///< typedef to value_type& + typedef boost::lvalue_property_map_tag category; ///< boost::lvalue_property_map_tag + + /// Access a property map element. + /// + /// @commentheading Template Parameters: + /// @param Iter Type convertible to key_type. + template + reference operator[](Iter tuple) const { return (reference) tuple->get(); } +}; + +/// Free function to create a Nth_of_tuple_property_map property map. +/// +/// @relates Nth_of_tuple_property_map +template // Type convertible to key_type +Nth_of_tuple_property_map::type> +make_nth_of_tuple_property_map(Iter) +{ + // value_type_traits is a workaround as back_insert_iterator's value_type is void + return Nth_of_tuple_property_map::type>(); +} + + +} // namespace CGAL + +#endif // CGAL_POINT_SET_PROPERTY_MAP_H diff --git a/Point_set_processing_3/include/CGAL/radial_orient_normals.h b/Point_set_processing_3/include/CGAL/radial_orient_normals.h index 09e768f1f4f..a7b1e530afd 100644 --- a/Point_set_processing_3/include/CGAL/radial_orient_normals.h +++ b/Point_set_processing_3/include/CGAL/radial_orient_normals.h @@ -19,7 +19,7 @@ #ifndef CGAL_RADIAL_ORIENT_NORMALS_H #define CGAL_RADIAL_ORIENT_NORMALS_H -#include +#include #include #include diff --git a/Point_set_processing_3/include/CGAL/random_simplify_point_set.h b/Point_set_processing_3/include/CGAL/random_simplify_point_set.h index b96cc606f0e..4a32c23acbc 100644 --- a/Point_set_processing_3/include/CGAL/random_simplify_point_set.h +++ b/Point_set_processing_3/include/CGAL/random_simplify_point_set.h @@ -19,7 +19,7 @@ #ifndef CGAL_RANDOM_SIMPLIFY_POINT_SET_H #define CGAL_RANDOM_SIMPLIFY_POINT_SET_H -#include +#include #include #include diff --git a/Point_set_processing_3/include/CGAL/remove_outliers.h b/Point_set_processing_3/include/CGAL/remove_outliers.h index 55f86c05ba5..fba87801225 100644 --- a/Point_set_processing_3/include/CGAL/remove_outliers.h +++ b/Point_set_processing_3/include/CGAL/remove_outliers.h @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include diff --git a/Point_set_processing_3/include/CGAL/remove_outliers_wrt_median_knn_sq_distance.h b/Point_set_processing_3/include/CGAL/remove_outliers_wrt_median_knn_sq_distance.h index 81d18cd743b..1fb8b77657f 100644 --- a/Point_set_processing_3/include/CGAL/remove_outliers_wrt_median_knn_sq_distance.h +++ b/Point_set_processing_3/include/CGAL/remove_outliers_wrt_median_knn_sq_distance.h @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include diff --git a/Point_set_processing_3/test/Point_set_processing_3/normal_estimation_test.cpp b/Point_set_processing_3/test/Point_set_processing_3/normal_estimation_test.cpp index e7064b2e768..9edc8344f75 100644 --- a/Point_set_processing_3/test/Point_set_processing_3/normal_estimation_test.cpp +++ b/Point_set_processing_3/test/Point_set_processing_3/normal_estimation_test.cpp @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include @@ -135,7 +135,7 @@ bool run_pca_estimate_normals(PointList& points, // input points + output normal << nb_neighbors_pca_normals << "%=" << nb_neighbors <<")...\n"; CGAL::pca_estimate_normals(points.begin(), points.end(), - CGAL::make_normal_vector_property_map(points.begin()), + CGAL::make_normal_of_point_with_normal_pmap(points.begin()), nb_neighbors); long memory = CGAL::Memory_sizer().virtual_size(); @@ -167,7 +167,7 @@ bool run_jet_estimate_normals(PointList& points, // input points + output normal << nb_neighbors_jet_fitting_normals << "%=" << nb_neighbors <<")...\n"; CGAL::jet_estimate_normals(points.begin(), points.end(), - CGAL::make_normal_vector_property_map(points.begin()), + CGAL::make_normal_of_point_with_normal_pmap(points.begin()), nb_neighbors); long memory = CGAL::Memory_sizer().virtual_size(); @@ -247,7 +247,7 @@ bool run_mst_orient_normals(PointList& points, // input points + input/output no PointList::iterator unoriented_points_begin = CGAL::mst_orient_normals(points.begin(), points.end(), - CGAL::make_normal_vector_property_map(points.begin()), + CGAL::make_normal_of_point_with_normal_pmap(points.begin()), nb_neighbors_mst); long memory = CGAL::Memory_sizer().virtual_size(); @@ -319,7 +319,7 @@ int main(int argc, char * argv[]) success = stream && CGAL::read_off_points_and_normals(stream, std::back_inserter(points), - CGAL::make_normal_vector_property_map(std::back_inserter(points))); + CGAL::make_normal_of_point_with_normal_pmap(std::back_inserter(points))); } // If XYZ file format else if (extension == ".xyz" || extension == ".XYZ" || @@ -329,7 +329,7 @@ int main(int argc, char * argv[]) success = stream && CGAL::read_xyz_points_and_normals(stream, std::back_inserter(points), - CGAL::make_normal_vector_property_map(std::back_inserter(points))); + CGAL::make_normal_of_point_with_normal_pmap(std::back_inserter(points))); } if (success) { diff --git a/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/Point_set_demo/Point_set_demo_APSS_reconstruction_plugin_cgal_code.cpp b/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/Point_set_demo/Point_set_demo_APSS_reconstruction_plugin_cgal_code.cpp index dc245317e12..8ae0d275335 100644 --- a/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/Point_set_demo/Point_set_demo_APSS_reconstruction_plugin_cgal_code.cpp +++ b/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/Point_set_demo/Point_set_demo_APSS_reconstruction_plugin_cgal_code.cpp @@ -63,7 +63,7 @@ Polyhedron* APSS_reconstruct(const Point_set& points, // Creates implicit function APSS_reconstruction_function implicit_function(points.begin(), points.end(), - CGAL::make_normal_vector_property_map(points.begin()), + CGAL::make_normal_of_point_with_normal_pmap(points.begin()), smoothness); // Prints status diff --git a/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/Point_set_demo/Point_set_demo_normal_estimation_plugin.cpp b/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/Point_set_demo/Point_set_demo_normal_estimation_plugin.cpp index c033f4c3348..7399e91a9d7 100644 --- a/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/Point_set_demo/Point_set_demo_normal_estimation_plugin.cpp +++ b/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/Point_set_demo/Point_set_demo_normal_estimation_plugin.cpp @@ -90,7 +90,7 @@ void Point_set_demo_normal_estimation_plugin::on_actionNormalEstimation_triggere // + property maps to access each point's position and normal. // The position property map can be omitted here as we use iterators over Point_3 elements. CGAL::pca_estimate_normals(points->begin(), points->end(), - CGAL::make_normal_vector_property_map(points->begin()), + CGAL::make_normal_of_point_with_normal_pmap(points->begin()), dialog.directionNbNeighbors()); // Mark all normals as unoriented @@ -111,7 +111,7 @@ void Point_set_demo_normal_estimation_plugin::on_actionNormalEstimation_triggere // + property maps to access each point's position and normal. // The position property map can be omitted here as we use iterators over Point_3 elements. CGAL::jet_estimate_normals(points->begin(), points->end(), - CGAL::make_normal_vector_property_map(points->begin()), + CGAL::make_normal_of_point_with_normal_pmap(points->begin()), dialog.directionNbNeighbors()); // Mark all normals as unoriented @@ -135,7 +135,7 @@ void Point_set_demo_normal_estimation_plugin::on_actionNormalEstimation_triggere // The position property map can be omitted here as we use iterators over Point_3 elements. points->unoriented_points_begin() = CGAL::mst_orient_normals(points->begin(), points->end(), - CGAL::make_normal_vector_property_map(points->begin()), + CGAL::make_normal_of_point_with_normal_pmap(points->begin()), dialog.orientationNbNeighbors()); // Delete points with an unoriented normal (required by APSS and Poisson) diff --git a/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/Point_set_demo/Point_set_scene_item.cpp b/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/Point_set_demo/Point_set_scene_item.cpp index 98f3d0ce11e..d0ae24a3f86 100644 --- a/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/Point_set_demo/Point_set_scene_item.cpp +++ b/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/Point_set_demo/Point_set_scene_item.cpp @@ -70,7 +70,7 @@ bool Point_set_scene_item::read_off_point_set(std::istream& stream) bool ok = stream && CGAL::read_off_points_and_normals(stream, std::back_inserter(*m_points), - CGAL::make_normal_vector_property_map(std::back_inserter(*m_points))) && + CGAL::make_normal_of_point_with_normal_pmap(std::back_inserter(*m_points))) && !isEmpty(); // Mark all normals as oriented @@ -87,7 +87,7 @@ bool Point_set_scene_item::write_off_point_set(std::ostream& stream) const return stream && CGAL::write_off_points_and_normals(stream, m_points->begin(), m_points->end(), - CGAL::make_normal_vector_property_map(m_points->begin())); + CGAL::make_normal_of_point_with_normal_pmap(m_points->begin())); } // Loads point set from .XYZ file @@ -99,7 +99,7 @@ bool Point_set_scene_item::read_xyz_point_set(std::istream& stream) bool ok = stream && CGAL::read_xyz_points_and_normals(stream, std::back_inserter(*m_points), - CGAL::make_normal_vector_property_map(std::back_inserter(*m_points))) && + CGAL::make_normal_of_point_with_normal_pmap(std::back_inserter(*m_points))) && !isEmpty(); // Mark all normals as oriented @@ -116,7 +116,7 @@ bool Point_set_scene_item::write_xyz_point_set(std::ostream& stream) const return stream && CGAL::write_xyz_points_and_normals(stream, m_points->begin(), m_points->end(), - CGAL::make_normal_vector_property_map(m_points->begin())); + CGAL::make_normal_of_point_with_normal_pmap(m_points->begin())); } QString diff --git a/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/Point_set_demo/include/Point_set_3.h b/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/Point_set_demo/include/Point_set_3.h index dad85efb0b7..76cad06a467 100644 --- a/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/Point_set_demo/include/Point_set_3.h +++ b/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/Point_set_demo/include/Point_set_3.h @@ -4,7 +4,7 @@ #define POINT_SET_3_H #include -#include +#include #include #include diff --git a/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/poisson/PoissonDoc.cpp b/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/poisson/PoissonDoc.cpp index 5c5915b934b..3f9fec5cc53 100644 --- a/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/poisson/PoissonDoc.cpp +++ b/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/poisson/PoissonDoc.cpp @@ -237,7 +237,7 @@ BOOL CPoissonDoc::OnOpenDocument(LPCTSTR lpszPathName) if( ! stream || ! CGAL::read_off_points_and_normals(stream, std::back_inserter(m_points), - CGAL::make_normal_vector_property_map(std::back_inserter(m_points))) ) + CGAL::make_normal_of_point_with_normal_pmap(std::back_inserter(m_points))) ) { prompt_message("Unable to read file"); update_status(); @@ -253,7 +253,7 @@ BOOL CPoissonDoc::OnOpenDocument(LPCTSTR lpszPathName) if( ! stream || ! CGAL::read_xyz_points_and_normals(stream, std::back_inserter(m_points), - CGAL::make_normal_vector_property_map(std::back_inserter(m_points))) ) + CGAL::make_normal_of_point_with_normal_pmap(std::back_inserter(m_points))) ) { prompt_message("Unable to read file"); update_status(); @@ -364,7 +364,7 @@ void CPoissonDoc::OnFileSaveAs() ok = stream && CGAL::write_xyz_points_and_normals(stream, m_points.begin(), m_points.end(), - CGAL::make_normal_vector_property_map(m_points.begin())); + CGAL::make_normal_of_point_with_normal_pmap(m_points.begin())); } else { @@ -389,7 +389,7 @@ void CPoissonDoc::OnFileSaveAs() ok = stream && CGAL::write_off_points_and_normals(stream, m_points.begin(), m_points.end(), - CGAL::make_normal_vector_property_map(m_points.begin())); + CGAL::make_normal_of_point_with_normal_pmap(m_points.begin())); } else { @@ -705,7 +705,7 @@ void CPoissonDoc::OnAlgorithmsEstimateNormalsByPCA() m_nb_neighbors_pca_normals, nb_neighbors); CGAL::pca_estimate_normals(m_points.begin(), m_points.end(), - CGAL::make_normal_vector_property_map(m_points.begin()), + CGAL::make_normal_of_point_with_normal_pmap(m_points.begin()), nb_neighbors); // Mark all normals as unoriented @@ -742,7 +742,7 @@ void CPoissonDoc::OnAlgorithmsEstimateNormalsByJetFitting() m_nb_neighbors_jet_fitting_normals, nb_neighbors); CGAL::jet_estimate_normals(m_points.begin(), m_points.end(), - CGAL::make_normal_vector_property_map(m_points.begin()), + CGAL::make_normal_of_point_with_normal_pmap(m_points.begin()), nb_neighbors); // Mark all normals as unoriented @@ -832,7 +832,7 @@ void CPoissonDoc::OnAlgorithmsOrientNormalsWithMST() // The position property map can be omitted here as we use iterators over Point_3 elements. m_points.unoriented_points_begin() = CGAL::mst_orient_normals(m_points.begin(), m_points.end(), - CGAL::make_normal_vector_property_map(m_points.begin()), + CGAL::make_normal_of_point_with_normal_pmap(m_points.begin()), m_nb_neighbors_mst); // Check the accuracy of normal orientation. @@ -984,7 +984,7 @@ void CPoissonDoc::OnOneStepPoissonReconstructionWithNormalizedDivergence() // The position property map can be omitted here as we use iterators over Point_3 elements. assert(m_poisson_function == NULL); m_poisson_function = new Poisson_reconstruction_function(m_points.begin(), m_points.end(), - CGAL::make_normal_vector_property_map(m_points.begin())); + CGAL::make_normal_of_point_with_normal_pmap(m_points.begin())); // Prints status status_message("Creates Poisson triangulation...done (%.2lf s)", task_timer.time()); @@ -1178,7 +1178,7 @@ void CPoissonDoc::OnReconstructionApssReconstruction() // Creates implicit function m_apss_function = new APSS_reconstruction_function(m_points.begin(), m_points.end(), - CGAL::make_normal_vector_property_map(m_points.begin()), + CGAL::make_normal_of_point_with_normal_pmap(m_points.begin()), m_smoothness_apss); // Gets point inside the implicit surface @@ -1344,7 +1344,7 @@ void CPoissonDoc::OnRadialNormalOrientation() m_points.unoriented_points_begin() = CGAL::radial_orient_normals(m_points.begin(), m_points.end(), - CGAL::make_normal_vector_property_map(m_points.begin())); + CGAL::make_normal_of_point_with_normal_pmap(m_points.begin())); // Check the accuracy of normal orientation. // If original normals are available, compare with them. diff --git a/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/poisson/include/Point_set_3.h b/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/poisson/include/Point_set_3.h index 129adc2cf40..3c3851f4e7c 100644 --- a/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/poisson/include/Point_set_3.h +++ b/Surface_reconstruction_points_3/demo/Surface_reconstruction_points_3/poisson/include/Point_set_3.h @@ -4,7 +4,7 @@ #define POINT_SET_3_H #include -#include +#include #include #include diff --git a/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3/PkgDescription.tex b/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3/PkgDescription.tex index 20316c454ee..6a8cd6c151c 100644 --- a/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3/PkgDescription.tex +++ b/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3/PkgDescription.tex @@ -5,7 +5,7 @@ \ccPkgDependsOn{\ccThirdPartyTaucs} \ccPkgIntroducedInCGAL{3.5} \ccPkgLicense{\ccLicenseQPL} -\ccPkgDemo{Poisson}{Poisson.zip} +\ccPkgDemo{Point_set}{Point_set.zip} \ccPkgIllustration{Surface_reconstruction_points_3/fig/surface_reconstruction_points_detail.png}{Surface_reconstruction_points_3/fig/surface_reconstruction_points.jpg} \end{ccPkgDescription} diff --git a/Surface_reconstruction_points_3/examples/Surface_reconstruction_points_3/APSS_reconstruction.cpp b/Surface_reconstruction_points_3/examples/Surface_reconstruction_points_3/APSS_reconstruction.cpp index 9ddd9128d75..8d412a0cf3e 100644 --- a/Surface_reconstruction_points_3/examples/Surface_reconstruction_points_3/APSS_reconstruction.cpp +++ b/Surface_reconstruction_points_3/examples/Surface_reconstruction_points_3/APSS_reconstruction.cpp @@ -20,7 +20,7 @@ // This package #include #include -#include +#include #include #include @@ -155,7 +155,7 @@ int main(int argc, char * argv[]) !CGAL::read_xyz_points_and_normals( stream, std::back_inserter(points), - CGAL::make_normal_vector_property_map(std::back_inserter(points)))) + CGAL::make_normal_of_point_with_normal_pmap(std::back_inserter(points)))) { std::cerr << "Error: cannot read file " << input_filename << std::endl; return EXIT_FAILURE; @@ -203,7 +203,7 @@ int main(int argc, char * argv[]) // The position property map can be omitted here as we use iterators over Point_3 elements. APSS_reconstruction_function implicit_function( points.begin(), points.end(), - CGAL::make_normal_vector_property_map(points.begin()), + CGAL::make_normal_of_point_with_normal_pmap(points.begin()), smoothness); // Recover memory used by points[] diff --git a/Surface_reconstruction_points_3/examples/Surface_reconstruction_points_3/poisson_reconstruction.cpp b/Surface_reconstruction_points_3/examples/Surface_reconstruction_points_3/poisson_reconstruction.cpp index 55c5094f708..dc194f1c8e5 100644 --- a/Surface_reconstruction_points_3/examples/Surface_reconstruction_points_3/poisson_reconstruction.cpp +++ b/Surface_reconstruction_points_3/examples/Surface_reconstruction_points_3/poisson_reconstruction.cpp @@ -21,7 +21,7 @@ // This package #include #include -#include +#include #include #include "compute_normal.h" @@ -149,7 +149,7 @@ int main(int argc, char * argv[]) !CGAL::read_xyz_points_and_normals( stream, std::back_inserter(points), - CGAL::make_normal_vector_property_map(std::back_inserter(points)))) + CGAL::make_normal_of_point_with_normal_pmap(std::back_inserter(points)))) { std::cerr << "Error: cannot read file " << input_filename << std::endl; return EXIT_FAILURE; @@ -197,7 +197,7 @@ int main(int argc, char * argv[]) // The position property map can be omitted here as we use iterators over Point_3 elements. Poisson_reconstruction_function implicit_function( points.begin(), points.end(), - CGAL::make_normal_vector_property_map(points.begin())); + CGAL::make_normal_of_point_with_normal_pmap(points.begin())); // Recover memory used by points[] points.clear(); diff --git a/Surface_reconstruction_points_3/examples/Surface_reconstruction_points_3/poisson_reconstruction_example.cpp b/Surface_reconstruction_points_3/examples/Surface_reconstruction_points_3/poisson_reconstruction_example.cpp index 8f9fd100dcb..4fb9aae6b18 100644 --- a/Surface_reconstruction_points_3/examples/Surface_reconstruction_points_3/poisson_reconstruction_example.cpp +++ b/Surface_reconstruction_points_3/examples/Surface_reconstruction_points_3/poisson_reconstruction_example.cpp @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include #include @@ -40,7 +40,7 @@ int main(void) !CGAL::read_xyz_points_and_normals( stream, std::back_inserter(points), - CGAL::make_normal_vector_property_map(std::back_inserter(points)))) + CGAL::make_normal_of_point_with_normal_pmap(std::back_inserter(points)))) { return EXIT_FAILURE; } @@ -51,7 +51,7 @@ int main(void) // The position property map can be omitted here as we use iterators over Point_3 elements. Poisson_reconstruction_function implicit_function( points.begin(), points.end(), - CGAL::make_normal_vector_property_map(points.begin())); + CGAL::make_normal_of_point_with_normal_pmap(points.begin())); // Computes the Poisson indicator function f() // at each vertex of the triangulation. diff --git a/Surface_reconstruction_points_3/include/CGAL/APSS_reconstruction_function.h b/Surface_reconstruction_points_3/include/CGAL/APSS_reconstruction_function.h index aca667cbd9b..7573514e843 100644 --- a/Surface_reconstruction_points_3/include/CGAL/APSS_reconstruction_function.h +++ b/Surface_reconstruction_points_3/include/CGAL/APSS_reconstruction_function.h @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include #include diff --git a/Surface_reconstruction_points_3/include/CGAL/Poisson_reconstruction_function.h b/Surface_reconstruction_points_3/include/CGAL/Poisson_reconstruction_function.h index c53c8391407..29a7d855312 100644 --- a/Surface_reconstruction_points_3/include/CGAL/Poisson_reconstruction_function.h +++ b/Surface_reconstruction_points_3/include/CGAL/Poisson_reconstruction_function.h @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/Surface_reconstruction_points_3/include/CGAL/Reconstruction_triangulation_3.h b/Surface_reconstruction_points_3/include/CGAL/Reconstruction_triangulation_3.h index 2b75f1762cc..b20801737a3 100644 --- a/Surface_reconstruction_points_3/include/CGAL/Reconstruction_triangulation_3.h +++ b/Surface_reconstruction_points_3/include/CGAL/Reconstruction_triangulation_3.h @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include diff --git a/Surface_reconstruction_points_3/test/Surface_reconstruction_points_3/APSS_reconstruction_test.cpp b/Surface_reconstruction_points_3/test/Surface_reconstruction_points_3/APSS_reconstruction_test.cpp index 1cd609dfc72..e57af3bb75c 100644 --- a/Surface_reconstruction_points_3/test/Surface_reconstruction_points_3/APSS_reconstruction_test.cpp +++ b/Surface_reconstruction_points_3/test/Surface_reconstruction_points_3/APSS_reconstruction_test.cpp @@ -20,7 +20,7 @@ // This package #include #include -#include +#include #include #include @@ -146,7 +146,7 @@ int main(int argc, char * argv[]) !CGAL::read_xyz_points_and_normals( stream, std::back_inserter(points), - CGAL::make_normal_vector_property_map(std::back_inserter(points)))) + CGAL::make_normal_of_point_with_normal_pmap(std::back_inserter(points)))) { std::cerr << "Error: cannot read file " << input_filename << std::endl; accumulated_fatal_err = EXIT_FAILURE; @@ -200,7 +200,7 @@ int main(int argc, char * argv[]) // The position property map can be omitted here as we use iterators over Point_3 elements. APSS_reconstruction_function implicit_function( points.begin(), points.end(), - CGAL::make_normal_vector_property_map(points.begin()), + CGAL::make_normal_of_point_with_normal_pmap(points.begin()), smoothness); // Recover memory used by points[] diff --git a/Surface_reconstruction_points_3/test/Surface_reconstruction_points_3/poisson_reconstruction_test.cpp b/Surface_reconstruction_points_3/test/Surface_reconstruction_points_3/poisson_reconstruction_test.cpp index 044e1dbaca4..db768caa74d 100644 --- a/Surface_reconstruction_points_3/test/Surface_reconstruction_points_3/poisson_reconstruction_test.cpp +++ b/Surface_reconstruction_points_3/test/Surface_reconstruction_points_3/poisson_reconstruction_test.cpp @@ -20,7 +20,7 @@ // This package #include #include -#include +#include #include #include "compute_normal.h" @@ -143,7 +143,7 @@ int main(int argc, char * argv[]) !CGAL::read_xyz_points_and_normals( stream, std::back_inserter(points), - CGAL::make_normal_vector_property_map(std::back_inserter(points)))) + CGAL::make_normal_of_point_with_normal_pmap(std::back_inserter(points)))) { std::cerr << "Error: cannot read file " << input_filename << std::endl; accumulated_fatal_err = EXIT_FAILURE; @@ -197,7 +197,7 @@ int main(int argc, char * argv[]) // The position property map can be omitted here as we use iterators over Point_3 elements. Poisson_reconstruction_function implicit_function( points.begin(), points.end(), - CGAL::make_normal_vector_property_map(points.begin())); + CGAL::make_normal_of_point_with_normal_pmap(points.begin())); // Recover memory used by points[] points.clear();