mirror of https://github.com/CGAL/cgal
Changes after Surface_reconstruction_points_3/Point_set_processing_3 submission review by AF (12):
Document property maps and move them to Support Lib: * Added new chapter "CGAL abd Boost Property Maps" (Property_map) to Support Lib: - it is located in Point_set_processing_3/doc_tex/Property_map. - it documents Dereference_property_map, First_of_pair_property_map, Second_of_pair_property_map and Nth_of_tuple_property_map. * Renamed point_set_property_map.h as property_map.h * Moved Normal_vector_property_map to Point_with_normal_3.h and renamed it Normal_of_point_with_normal_pmap.
This commit is contained in:
parent
3b12ebe45a
commit
e3aea2e92d
|
|
@ -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/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/simplification.tex -text
|
||||||
Point_set_processing_3/doc_tex/Point_set_processing_3/smoothing.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 -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/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
|
Point_set_processing_3/examples/Point_set_processing_3/data/ChineseDragon-10kv.off -text svneol=unset#application/octet-stream
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
\ccPkgDependsOn{\ccThirdPartyLapack}
|
\ccPkgDependsOn{\ccThirdPartyLapack}
|
||||||
\ccPkgIntroducedInCGAL{3.5}
|
\ccPkgIntroducedInCGAL{3.5}
|
||||||
\ccPkgLicense{\ccLicenseQPL}
|
\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}
|
\ccPkgIllustration{Point_set_processing_3/fig/point_set_processing_detail.png}{Point_set_processing_3/fig/point_set_processing.jpg}
|
||||||
|
|
||||||
\end{ccPkgDescription}
|
\end{ccPkgDescription}
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,36 @@
|
||||||
\section{Input/Output}
|
\section{Input/Output}
|
||||||
|
|
||||||
|
|
||||||
|
\subsection{Property Maps}
|
||||||
|
|
||||||
The algorithms of this component take as input parameters iterator ranges of 3D points, or points with normals.
|
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
|
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<Point_3<K>, Vector_3<K> >}, or as a \ccc{boost::tuple<..,Point_3<K>, ..., Vector_3<K> >}, the
|
\ccc{std::pair<Point_3<K>, Vector_3<K> >}, or as a \ccc{boost::tuple<..,Point_3<K>, ..., Vector_3<K> >}, the
|
||||||
algorithms use property maps to access the point or vector information in the input data.
|
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}.
|
|
||||||
\\
|
\\
|
||||||
|
An another component provides property maps to support these cases: \\
|
||||||
|
\ccc{CGAL::Dereference_property_map<T>} \\
|
||||||
|
\ccc{CGAL::First_of_pair_property_map<Pair>} and \ccc{CGAL::Second_of_pair_property_map<Pair>} \\
|
||||||
|
\ccc{CGAL::Nth_of_tuple_property_map<N, Tuple>} \\
|
||||||
|
\\
|
||||||
|
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_xyz_points} \\
|
||||||
\ccc{CGAL::read_off_points} \\
|
\ccc{CGAL::read_off_points} \\
|
||||||
\ccc{CGAL::write_off_points} \\
|
\ccc{CGAL::write_off_points} \\
|
||||||
\ccc{CGAL::write_xyz_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}
|
\ccIncludeExampleCode{Point_set_processing_3/read_write_xyz_point_set_example.cpp}
|
||||||
|
|
@ -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}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -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<Point_3<K>, Vector_3<K> >}, or as a \ccc{boost::tuple<..,Point_3<K>, ..., Vector_3<K> >}.
|
||||||
|
|
||||||
|
This component provides property maps to support these cases: \\
|
||||||
|
\ccc{CGAL::Dereference_property_map<T>} \\
|
||||||
|
\ccc{CGAL::First_of_pair_property_map<Pair>} and \ccc{CGAL::Second_of_pair_property_map<Pair>} \\
|
||||||
|
\ccc{CGAL::Nth_of_tuple_property_map<N, Tuple>} \\
|
||||||
|
|
||||||
|
\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}
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 63 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 6.2 KiB |
|
|
@ -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
|
||||||
|
|
@ -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<T>}
|
||||||
|
|
||||||
|
%% \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<T& , Dereference_property_map<T>} $>$
|
||||||
|
|
||||||
|
%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<class Iter> 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<typename value_type_traits<Iter>::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
|
||||||
|
% +------------------------------------------------------------------------+
|
||||||
|
|
||||||
|
|
@ -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<Pair>}
|
||||||
|
|
||||||
|
%% \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<Pair::first_type& , First_of_pair_property_map<Pair>} $>$
|
||||||
|
|
||||||
|
%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<class Iter> 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<typename value_type_traits<Iter>::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<Pair>} \\
|
||||||
|
|
||||||
|
\ccExample
|
||||||
|
|
||||||
|
See \ccc{property_map.cpp} example.
|
||||||
|
|
||||||
|
\end{ccRefClass}
|
||||||
|
|
||||||
|
% +------------------------------------------------------------------------+
|
||||||
|
%%RefPage: end of main body, begin of footer
|
||||||
|
\ccRefPageEnd
|
||||||
|
% EOF
|
||||||
|
% +------------------------------------------------------------------------+
|
||||||
|
|
||||||
|
|
@ -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<N, Tuple>}
|
||||||
|
|
||||||
|
%% \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<boost::tuples::element<N, Tuple>::type}\& , \ccc{Nth_of_tuple_property_map<N, Tuple>} $>$
|
||||||
|
|
||||||
|
%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<N, Tuple>::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<class Iter> 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<N, typename value_type_traits<Iter>::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
|
||||||
|
% +------------------------------------------------------------------------+
|
||||||
|
|
||||||
|
|
@ -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<Pair>}
|
||||||
|
|
||||||
|
%% \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<Pair::second_type& , Second_of_pair_property_map<Pair>} $>$
|
||||||
|
|
||||||
|
%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<class Iter> 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<typename value_type_traits<Iter>::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<Pair>} \\
|
||||||
|
|
||||||
|
\ccExample
|
||||||
|
|
||||||
|
See \ccc{property_map.cpp} example.
|
||||||
|
|
||||||
|
\end{ccRefClass}
|
||||||
|
|
||||||
|
% +------------------------------------------------------------------------+
|
||||||
|
%%RefPage: end of main body, begin of footer
|
||||||
|
\ccRefPageEnd
|
||||||
|
% EOF
|
||||||
|
% +------------------------------------------------------------------------+
|
||||||
|
|
||||||
|
|
@ -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<T>} \\
|
||||||
|
\ccRefIdfierPage{CGAL::First_of_pair_property_map<Pair>} \\
|
||||||
|
\ccRefIdfierPage{CGAL::Second_of_pair_property_map<Pair>} \\
|
||||||
|
\ccRefIdfierPage{CGAL::Nth_of_tuple_property_map<N, Tuple>} \\
|
||||||
|
|
||||||
|
|
@ -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
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
#include <CGAL/jet_estimate_normals.h>
|
#include <CGAL/jet_estimate_normals.h>
|
||||||
#include <CGAL/mst_orient_normals.h>
|
#include <CGAL/mst_orient_normals.h>
|
||||||
#include <CGAL/Point_with_normal_3.h>
|
#include <CGAL/Point_with_normal_3.h>
|
||||||
#include <CGAL/point_set_property_map.h>
|
#include <CGAL/property_map.h>
|
||||||
#include <CGAL/IO/read_off_points.h>
|
#include <CGAL/IO/read_off_points.h>
|
||||||
#include <CGAL/IO/read_xyz_points.h>
|
#include <CGAL/IO/read_xyz_points.h>
|
||||||
#include <CGAL/IO/write_xyz_points.h>
|
#include <CGAL/IO/write_xyz_points.h>
|
||||||
|
|
@ -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.
|
// + 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.
|
// 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::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);
|
nb_neighbors);
|
||||||
|
|
||||||
long memory = CGAL::Memory_sizer().virtual_size();
|
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.
|
// + 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.
|
// 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::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);
|
nb_neighbors);
|
||||||
|
|
||||||
long memory = CGAL::Memory_sizer().virtual_size();
|
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.
|
// The position property map can be omitted here as we use iterators over Point_3 elements.
|
||||||
PointList::iterator unoriented_points_begin =
|
PointList::iterator unoriented_points_begin =
|
||||||
CGAL::mst_orient_normals(points.begin(), points.end(),
|
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);
|
nb_neighbors_mst);
|
||||||
|
|
||||||
// Optional: delete points with an unoriented normal
|
// Optional: delete points with an unoriented normal
|
||||||
|
|
@ -292,7 +292,7 @@ int main(int argc, char * argv[])
|
||||||
if (!stream ||
|
if (!stream ||
|
||||||
!CGAL::write_xyz_points_and_normals(stream,
|
!CGAL::write_xyz_points_and_normals(stream,
|
||||||
points.begin(), points.end(),
|
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;
|
std::cerr << "Error: cannot write file " << output_filename << std::endl;
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
#include <CGAL/pca_estimate_normals.h>
|
#include <CGAL/pca_estimate_normals.h>
|
||||||
#include <CGAL/mst_orient_normals.h>
|
#include <CGAL/mst_orient_normals.h>
|
||||||
#include <CGAL/Point_with_normal_3.h>
|
#include <CGAL/Point_with_normal_3.h>
|
||||||
#include <CGAL/point_set_property_map.h>
|
#include <CGAL/property_map.h>
|
||||||
#include <CGAL/IO/read_xyz_points.h>
|
#include <CGAL/IO/read_xyz_points.h>
|
||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
@ -30,7 +30,7 @@ int main(void)
|
||||||
// The position property map can be omitted here as we use iterators over Point_3 elements.
|
// The position property map can be omitted here as we use iterators over Point_3 elements.
|
||||||
const int nb_neighbors = 7; // K-nearest neighbors
|
const int nb_neighbors = 7; // K-nearest neighbors
|
||||||
CGAL::pca_estimate_normals(points.begin(), points.end(),
|
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);
|
nb_neighbors);
|
||||||
|
|
||||||
// Orients normals.
|
// 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.
|
// The position property map can be omitted here as we use iterators over Point_3 elements.
|
||||||
std::list<Point_with_normal>::iterator unoriented_points_begin =
|
std::list<Point_with_normal>::iterator unoriented_points_begin =
|
||||||
CGAL::mst_orient_normals(points.begin(), points.end(),
|
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);
|
nb_neighbors);
|
||||||
|
|
||||||
// Optional: delete points with an unoriented normal
|
// Optional: delete points with an unoriented normal
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
// Usage: no parameters
|
// Usage: no parameters
|
||||||
|
|
||||||
#include <CGAL/Simple_cartesian.h>
|
#include <CGAL/Simple_cartesian.h>
|
||||||
#include <CGAL/point_set_property_map.h>
|
#include <CGAL/property_map.h>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <boost/tuple/tuple.hpp>
|
#include <boost/tuple/tuple.hpp>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||||
#include <CGAL/point_set_property_map.h>
|
#include <CGAL/property_map.h>
|
||||||
#include <CGAL/IO/read_xyz_points.h>
|
#include <CGAL/IO/read_xyz_points.h>
|
||||||
#include <CGAL/IO/write_xyz_points.h>
|
#include <CGAL/IO/write_xyz_points.h>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
#ifndef CGAL_READ_OFF_POINTS_H
|
#ifndef CGAL_READ_OFF_POINTS_H
|
||||||
#define CGAL_READ_OFF_POINTS_H
|
#define CGAL_READ_OFF_POINTS_H
|
||||||
|
|
||||||
#include <CGAL/point_set_property_map.h>
|
#include <CGAL/property_map.h>
|
||||||
#include <CGAL/value_type_traits.h>
|
#include <CGAL/value_type_traits.h>
|
||||||
#include <CGAL/point_set_processing_assertions.h>
|
#include <CGAL/point_set_processing_assertions.h>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
#ifndef CGAL_READ_XYZ_POINTS_H
|
#ifndef CGAL_READ_XYZ_POINTS_H
|
||||||
#define CGAL_READ_XYZ_POINTS_H
|
#define CGAL_READ_XYZ_POINTS_H
|
||||||
|
|
||||||
#include <CGAL/point_set_property_map.h>
|
#include <CGAL/property_map.h>
|
||||||
#include <CGAL/value_type_traits.h>
|
#include <CGAL/value_type_traits.h>
|
||||||
#include <CGAL/point_set_processing_assertions.h>
|
#include <CGAL/point_set_processing_assertions.h>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
#ifndef CGAL_WRITE_OFF_POINTS_H
|
#ifndef CGAL_WRITE_OFF_POINTS_H
|
||||||
#define CGAL_WRITE_OFF_POINTS_H
|
#define CGAL_WRITE_OFF_POINTS_H
|
||||||
|
|
||||||
#include <CGAL/point_set_property_map.h>
|
#include <CGAL/property_map.h>
|
||||||
#include <CGAL/point_set_processing_assertions.h>
|
#include <CGAL/point_set_processing_assertions.h>
|
||||||
|
|
||||||
#include <boost/property_map.hpp>
|
#include <boost/property_map.hpp>
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
#ifndef CGAL_WRITE_XYZ_POINTS_H
|
#ifndef CGAL_WRITE_XYZ_POINTS_H
|
||||||
#define CGAL_WRITE_XYZ_POINTS_H
|
#define CGAL_WRITE_XYZ_POINTS_H
|
||||||
|
|
||||||
#include <CGAL/point_set_property_map.h>
|
#include <CGAL/property_map.h>
|
||||||
#include <CGAL/point_set_processing_assertions.h>
|
#include <CGAL/point_set_processing_assertions.h>
|
||||||
|
|
||||||
#include <boost/property_map.hpp>
|
#include <boost/property_map.hpp>
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,9 @@
|
||||||
#include <CGAL/Point_3.h>
|
#include <CGAL/Point_3.h>
|
||||||
#include <CGAL/Vector_3.h>
|
#include <CGAL/Vector_3.h>
|
||||||
#include <CGAL/Origin.h>
|
#include <CGAL/Origin.h>
|
||||||
|
#include <CGAL/value_type_traits.h>
|
||||||
|
|
||||||
|
#include <boost/property_map.hpp>
|
||||||
|
|
||||||
CGAL_BEGIN_NAMESPACE
|
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 <class Gt>
|
||||||
|
struct Normal_of_point_with_normal_pmap
|
||||||
|
: public boost::put_get_helper<typename Gt::Vector_3&,
|
||||||
|
Normal_of_point_with_normal_pmap<Gt> >
|
||||||
|
{
|
||||||
|
typedef Point_with_normal_3<Gt> 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 <class Iter>
|
||||||
|
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 <class Iter> // Type convertible to key_type
|
||||||
|
Normal_of_point_with_normal_pmap<typename CGAL::Kernel_traits<typename CGAL::value_type_traits<Iter>::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<Iter>::type Value_type;
|
||||||
|
typedef typename CGAL::Kernel_traits<Value_type>::Kernel Kernel;
|
||||||
|
return Normal_of_point_with_normal_pmap<Kernel>();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
CGAL_END_NAMESPACE
|
CGAL_END_NAMESPACE
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
#include <CGAL/Search_traits_3.h>
|
#include <CGAL/Search_traits_3.h>
|
||||||
#include <CGAL/Orthogonal_k_neighbor_search.h>
|
#include <CGAL/Orthogonal_k_neighbor_search.h>
|
||||||
#include <CGAL/point_set_property_map.h>
|
#include <CGAL/property_map.h>
|
||||||
#include <CGAL/point_set_processing_assertions.h>
|
#include <CGAL/point_set_processing_assertions.h>
|
||||||
|
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
#ifndef CGAL_GRID_SIMPLIFY_POINT_SET_H
|
#ifndef CGAL_GRID_SIMPLIFY_POINT_SET_H
|
||||||
#define CGAL_GRID_SIMPLIFY_POINT_SET_H
|
#define CGAL_GRID_SIMPLIFY_POINT_SET_H
|
||||||
|
|
||||||
#include <CGAL/point_set_property_map.h>
|
#include <CGAL/property_map.h>
|
||||||
#include <CGAL/point_set_processing_assertions.h>
|
#include <CGAL/point_set_processing_assertions.h>
|
||||||
|
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
#include <CGAL/Search_traits_3.h>
|
#include <CGAL/Search_traits_3.h>
|
||||||
#include <CGAL/Orthogonal_k_neighbor_search.h>
|
#include <CGAL/Orthogonal_k_neighbor_search.h>
|
||||||
#include <CGAL/Monge_via_jet_fitting.h>
|
#include <CGAL/Monge_via_jet_fitting.h>
|
||||||
#include <CGAL/point_set_property_map.h>
|
#include <CGAL/property_map.h>
|
||||||
#include <CGAL/point_set_processing_assertions.h>
|
#include <CGAL/point_set_processing_assertions.h>
|
||||||
|
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
#include <CGAL/Search_traits_3.h>
|
#include <CGAL/Search_traits_3.h>
|
||||||
#include <CGAL/Orthogonal_k_neighbor_search.h>
|
#include <CGAL/Orthogonal_k_neighbor_search.h>
|
||||||
#include <CGAL/Monge_via_jet_fitting.h>
|
#include <CGAL/Monge_via_jet_fitting.h>
|
||||||
#include <CGAL/point_set_property_map.h>
|
#include <CGAL/property_map.h>
|
||||||
#include <CGAL/point_set_processing_assertions.h>
|
#include <CGAL/point_set_processing_assertions.h>
|
||||||
#include <CGAL/Memory_sizer.h>
|
#include <CGAL/Memory_sizer.h>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
#include <CGAL/Search_traits_3.h>
|
#include <CGAL/Search_traits_3.h>
|
||||||
#include <CGAL/Orthogonal_k_neighbor_search.h>
|
#include <CGAL/Orthogonal_k_neighbor_search.h>
|
||||||
#include <CGAL/Monge_via_jet_fitting.h>
|
#include <CGAL/Monge_via_jet_fitting.h>
|
||||||
#include <CGAL/point_set_property_map.h>
|
#include <CGAL/property_map.h>
|
||||||
#include <CGAL/point_set_processing_assertions.h>
|
#include <CGAL/point_set_processing_assertions.h>
|
||||||
|
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
#include <CGAL/Search_traits_3.h>
|
#include <CGAL/Search_traits_3.h>
|
||||||
#include <CGAL/Orthogonal_k_neighbor_search.h>
|
#include <CGAL/Orthogonal_k_neighbor_search.h>
|
||||||
#include <CGAL/Search_traits_vertex_handle_3.h>
|
#include <CGAL/Search_traits_vertex_handle_3.h>
|
||||||
#include <CGAL/point_set_property_map.h>
|
#include <CGAL/property_map.h>
|
||||||
#include <CGAL/Index_property_map.h>
|
#include <CGAL/Index_property_map.h>
|
||||||
#include <CGAL/Memory_sizer.h>
|
#include <CGAL/Memory_sizer.h>
|
||||||
#include <CGAL/point_set_processing_assertions.h>
|
#include <CGAL/point_set_processing_assertions.h>
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
#include <CGAL/Search_traits_3.h>
|
#include <CGAL/Search_traits_3.h>
|
||||||
#include <CGAL/Orthogonal_k_neighbor_search.h>
|
#include <CGAL/Orthogonal_k_neighbor_search.h>
|
||||||
#include <CGAL/linear_least_squares_fitting_3.h>
|
#include <CGAL/linear_least_squares_fitting_3.h>
|
||||||
#include <CGAL/point_set_property_map.h>
|
#include <CGAL/property_map.h>
|
||||||
#include <CGAL/point_set_processing_assertions.h>
|
#include <CGAL/point_set_processing_assertions.h>
|
||||||
#include <CGAL/Memory_sizer.h>
|
#include <CGAL/Memory_sizer.h>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
#include <CGAL/Search_traits_3.h>
|
#include <CGAL/Search_traits_3.h>
|
||||||
#include <CGAL/linear_least_squares_fitting_3.h>
|
#include <CGAL/linear_least_squares_fitting_3.h>
|
||||||
#include <CGAL/Orthogonal_k_neighbor_search.h>
|
#include <CGAL/Orthogonal_k_neighbor_search.h>
|
||||||
#include <CGAL/point_set_property_map.h>
|
#include <CGAL/property_map.h>
|
||||||
#include <CGAL/point_set_processing_assertions.h>
|
#include <CGAL/point_set_processing_assertions.h>
|
||||||
|
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
|
|
||||||
|
|
@ -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 <CGAL/Point_with_normal_3.h>
|
|
||||||
#include <CGAL/value_type_traits.h>
|
|
||||||
|
|
||||||
#include <boost/property_map.hpp>
|
|
||||||
#include <boost/tuple/tuple.hpp>
|
|
||||||
|
|
||||||
#include <utility> // defines std::pair
|
|
||||||
|
|
||||||
namespace CGAL {
|
|
||||||
|
|
||||||
|
|
||||||
//=========================================================================
|
|
||||||
/// Property map T* -> T.
|
|
||||||
/// A common usage is a property map Point_with_normal_3* -> position (Point_3).
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
struct Dereference_property_map
|
|
||||||
: public boost::put_get_helper<T&, Dereference_property_map<T> >
|
|
||||||
{
|
|
||||||
typedef T* key_type;
|
|
||||||
typedef T value_type;
|
|
||||||
typedef value_type& reference;
|
|
||||||
typedef boost::lvalue_property_map_tag category;
|
|
||||||
|
|
||||||
/// Access the map elements.
|
|
||||||
template <class Iter> // Type convertible to key_type
|
|
||||||
reference operator[](Iter it) const { return reference(*it); }
|
|
||||||
};
|
|
||||||
|
|
||||||
/// Free function to create a Dereference_property_map property map
|
|
||||||
template <class Iter> // Type convertible to key_type
|
|
||||||
Dereference_property_map<typename CGAL::value_type_traits<Iter>::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<typename CGAL::value_type_traits<Iter>::type>();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//=========================================================================
|
|
||||||
/// Property map Point_with_normal_3* -> normal vector (Vector_3)
|
|
||||||
|
|
||||||
template <class Gt>
|
|
||||||
struct Normal_vector_property_map
|
|
||||||
: public boost::put_get_helper<typename Gt::Vector_3&,
|
|
||||||
Normal_vector_property_map<Gt> >
|
|
||||||
{
|
|
||||||
typedef Point_with_normal_3<Gt> 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 <class Iter> // 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 <class Iter> // Type convertible to key_type
|
|
||||||
Normal_vector_property_map<typename CGAL::Kernel_traits<typename CGAL::value_type_traits<Iter>::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<Iter>::type Value_type;
|
|
||||||
typedef typename CGAL::Kernel_traits<Value_type>::Kernel Kernel;
|
|
||||||
return Normal_vector_property_map<Kernel>();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//=========================================================================
|
|
||||||
// Property maps Pair* -> Pair::first_type
|
|
||||||
// and Pair* -> Pair::second_type.
|
|
||||||
|
|
||||||
/// Property map Pair* -> Pair::first_type
|
|
||||||
template <typename Pair>
|
|
||||||
struct First_of_pair_property_map
|
|
||||||
: public boost::put_get_helper<typename Pair::first_type&,
|
|
||||||
First_of_pair_property_map<Pair> >
|
|
||||||
{
|
|
||||||
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 <class Iter> // 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 <class Iter> // Type convertible to key_type
|
|
||||||
First_of_pair_property_map<typename CGAL::value_type_traits<Iter>::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<typename CGAL::value_type_traits<Iter>::type>();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Property map Pair* -> Pair::second_type
|
|
||||||
template <typename Pair>
|
|
||||||
struct Second_of_pair_property_map
|
|
||||||
: public boost::put_get_helper<typename Pair::second_type&,
|
|
||||||
Second_of_pair_property_map<Pair> >
|
|
||||||
{
|
|
||||||
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 <class Iter> // 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 <class Iter> // Type convertible to key_type
|
|
||||||
Second_of_pair_property_map<typename CGAL::value_type_traits<Iter>::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<typename CGAL::value_type_traits<Iter>::type>();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//=========================================================================
|
|
||||||
/// Property map Tuple* -> Nth element of tuple
|
|
||||||
|
|
||||||
template <int N, typename Tuple>
|
|
||||||
struct Nth_of_tuple_property_map
|
|
||||||
: public boost::put_get_helper<typename boost::tuples::element<N,Tuple>::type&,
|
|
||||||
Nth_of_tuple_property_map<N,Tuple> >
|
|
||||||
{
|
|
||||||
typedef Tuple* key_type;
|
|
||||||
typedef typename boost::tuples::element<N,Tuple>::type value_type;
|
|
||||||
typedef value_type& reference;
|
|
||||||
typedef boost::lvalue_property_map_tag category;
|
|
||||||
|
|
||||||
/// Access the map elements.
|
|
||||||
template <class Iter> // Type convertible to key_type
|
|
||||||
reference operator[](Iter tuple) const { return (reference) tuple->get<N>(); }
|
|
||||||
};
|
|
||||||
|
|
||||||
/// Free function to create a Nth_of_tuple_property_map property map
|
|
||||||
template <int N, class Iter> // Type convertible to key_type
|
|
||||||
Nth_of_tuple_property_map<N, typename CGAL::value_type_traits<Iter>::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<N, typename CGAL::value_type_traits<Iter>::type>();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
} // namespace CGAL
|
|
||||||
|
|
||||||
#endif // CGAL_POINT_SET_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 <CGAL/value_type_traits.h>
|
||||||
|
|
||||||
|
#include <boost/property_map.hpp>
|
||||||
|
#include <boost/tuple/tuple.hpp>
|
||||||
|
|
||||||
|
#include <utility> // 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 <typename T>
|
||||||
|
struct Dereference_property_map
|
||||||
|
: public boost::put_get_helper<T&, Dereference_property_map<T> >
|
||||||
|
{
|
||||||
|
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 <class Iter>
|
||||||
|
reference operator[](Iter it) const { return reference(*it); }
|
||||||
|
};
|
||||||
|
|
||||||
|
/// Free function to create a Dereference_property_map property map.
|
||||||
|
///
|
||||||
|
/// @relates Dereference_property_map
|
||||||
|
|
||||||
|
template <class Iter> // Type convertible to key_type
|
||||||
|
Dereference_property_map<typename CGAL::value_type_traits<Iter>::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<typename CGAL::value_type_traits<Iter>::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 <typename Pair>
|
||||||
|
struct First_of_pair_property_map
|
||||||
|
: public boost::put_get_helper<typename Pair::first_type&,
|
||||||
|
First_of_pair_property_map<Pair> >
|
||||||
|
{
|
||||||
|
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 <class Iter>
|
||||||
|
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 <class Iter> // Type convertible to key_type
|
||||||
|
First_of_pair_property_map<typename CGAL::value_type_traits<Iter>::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<typename CGAL::value_type_traits<Iter>::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 <typename Pair>
|
||||||
|
struct Second_of_pair_property_map
|
||||||
|
: public boost::put_get_helper<typename Pair::second_type&,
|
||||||
|
Second_of_pair_property_map<Pair> >
|
||||||
|
{
|
||||||
|
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 <class Iter>
|
||||||
|
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 <class Iter> // Type convertible to key_type
|
||||||
|
Second_of_pair_property_map<typename CGAL::value_type_traits<Iter>::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<typename CGAL::value_type_traits<Iter>::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 <int N, typename Tuple>
|
||||||
|
struct Nth_of_tuple_property_map
|
||||||
|
: public boost::put_get_helper<typename boost::tuples::element<N,Tuple>::type&,
|
||||||
|
Nth_of_tuple_property_map<N,Tuple> >
|
||||||
|
{
|
||||||
|
typedef Tuple* key_type; ///< typedef to 'Tuple*'
|
||||||
|
typedef typename boost::tuples::element<N,Tuple>::type value_type; ///< typedef to boost::tuples::element<N,Tuple>::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 <class Iter>
|
||||||
|
reference operator[](Iter tuple) const { return (reference) tuple->get<N>(); }
|
||||||
|
};
|
||||||
|
|
||||||
|
/// Free function to create a Nth_of_tuple_property_map property map.
|
||||||
|
///
|
||||||
|
/// @relates Nth_of_tuple_property_map
|
||||||
|
template <int N, class Iter> // Type convertible to key_type
|
||||||
|
Nth_of_tuple_property_map<N, typename CGAL::value_type_traits<Iter>::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<N, typename CGAL::value_type_traits<Iter>::type>();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} // namespace CGAL
|
||||||
|
|
||||||
|
#endif // CGAL_POINT_SET_PROPERTY_MAP_H
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
#ifndef CGAL_RADIAL_ORIENT_NORMALS_H
|
#ifndef CGAL_RADIAL_ORIENT_NORMALS_H
|
||||||
#define CGAL_RADIAL_ORIENT_NORMALS_H
|
#define CGAL_RADIAL_ORIENT_NORMALS_H
|
||||||
|
|
||||||
#include <CGAL/point_set_property_map.h>
|
#include <CGAL/property_map.h>
|
||||||
#include <CGAL/point_set_processing_assertions.h>
|
#include <CGAL/point_set_processing_assertions.h>
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
#ifndef CGAL_RANDOM_SIMPLIFY_POINT_SET_H
|
#ifndef CGAL_RANDOM_SIMPLIFY_POINT_SET_H
|
||||||
#define CGAL_RANDOM_SIMPLIFY_POINT_SET_H
|
#define CGAL_RANDOM_SIMPLIFY_POINT_SET_H
|
||||||
|
|
||||||
#include <CGAL/point_set_property_map.h>
|
#include <CGAL/property_map.h>
|
||||||
#include <CGAL/point_set_processing_assertions.h>
|
#include <CGAL/point_set_processing_assertions.h>
|
||||||
|
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
#include <CGAL/Search_traits_3.h>
|
#include <CGAL/Search_traits_3.h>
|
||||||
#include <CGAL/Orthogonal_k_neighbor_search.h>
|
#include <CGAL/Orthogonal_k_neighbor_search.h>
|
||||||
#include <CGAL/point_set_property_map.h>
|
#include <CGAL/property_map.h>
|
||||||
#include <CGAL/point_set_processing_assertions.h>
|
#include <CGAL/point_set_processing_assertions.h>
|
||||||
|
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
#include <CGAL/Search_traits_3.h>
|
#include <CGAL/Search_traits_3.h>
|
||||||
#include <CGAL/Orthogonal_k_neighbor_search.h>
|
#include <CGAL/Orthogonal_k_neighbor_search.h>
|
||||||
#include <CGAL/point_set_property_map.h>
|
#include <CGAL/property_map.h>
|
||||||
#include <CGAL/point_set_processing_assertions.h>
|
#include <CGAL/point_set_processing_assertions.h>
|
||||||
|
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
#include <CGAL/jet_estimate_normals.h>
|
#include <CGAL/jet_estimate_normals.h>
|
||||||
#include <CGAL/mst_orient_normals.h>
|
#include <CGAL/mst_orient_normals.h>
|
||||||
#include <CGAL/Point_with_normal_3.h>
|
#include <CGAL/Point_with_normal_3.h>
|
||||||
#include <CGAL/point_set_property_map.h>
|
#include <CGAL/property_map.h>
|
||||||
#include <CGAL/IO/read_off_points.h>
|
#include <CGAL/IO/read_off_points.h>
|
||||||
#include <CGAL/IO/read_xyz_points.h>
|
#include <CGAL/IO/read_xyz_points.h>
|
||||||
|
|
||||||
|
|
@ -135,7 +135,7 @@ bool run_pca_estimate_normals(PointList& points, // input points + output normal
|
||||||
<< nb_neighbors_pca_normals << "%=" << nb_neighbors <<")...\n";
|
<< nb_neighbors_pca_normals << "%=" << nb_neighbors <<")...\n";
|
||||||
|
|
||||||
CGAL::pca_estimate_normals(points.begin(), points.end(),
|
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);
|
nb_neighbors);
|
||||||
|
|
||||||
long memory = CGAL::Memory_sizer().virtual_size();
|
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";
|
<< nb_neighbors_jet_fitting_normals << "%=" << nb_neighbors <<")...\n";
|
||||||
|
|
||||||
CGAL::jet_estimate_normals(points.begin(), points.end(),
|
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);
|
nb_neighbors);
|
||||||
|
|
||||||
long memory = CGAL::Memory_sizer().virtual_size();
|
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 =
|
PointList::iterator unoriented_points_begin =
|
||||||
CGAL::mst_orient_normals(points.begin(), points.end(),
|
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);
|
nb_neighbors_mst);
|
||||||
|
|
||||||
long memory = CGAL::Memory_sizer().virtual_size();
|
long memory = CGAL::Memory_sizer().virtual_size();
|
||||||
|
|
@ -319,7 +319,7 @@ int main(int argc, char * argv[])
|
||||||
success = stream &&
|
success = stream &&
|
||||||
CGAL::read_off_points_and_normals(stream,
|
CGAL::read_off_points_and_normals(stream,
|
||||||
std::back_inserter(points),
|
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
|
// If XYZ file format
|
||||||
else if (extension == ".xyz" || extension == ".XYZ" ||
|
else if (extension == ".xyz" || extension == ".XYZ" ||
|
||||||
|
|
@ -329,7 +329,7 @@ int main(int argc, char * argv[])
|
||||||
success = stream &&
|
success = stream &&
|
||||||
CGAL::read_xyz_points_and_normals(stream,
|
CGAL::read_xyz_points_and_normals(stream,
|
||||||
std::back_inserter(points),
|
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)
|
if (success)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ Polyhedron* APSS_reconstruct(const Point_set& points,
|
||||||
|
|
||||||
// Creates implicit function
|
// Creates implicit function
|
||||||
APSS_reconstruction_function implicit_function(points.begin(), points.end(),
|
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);
|
smoothness);
|
||||||
|
|
||||||
// Prints status
|
// Prints status
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@ void Point_set_demo_normal_estimation_plugin::on_actionNormalEstimation_triggere
|
||||||
// + property maps to access each point's position and 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.
|
// 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::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());
|
dialog.directionNbNeighbors());
|
||||||
|
|
||||||
// Mark all normals as unoriented
|
// 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.
|
// + 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.
|
// 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::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());
|
dialog.directionNbNeighbors());
|
||||||
|
|
||||||
// Mark all normals as unoriented
|
// 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.
|
// The position property map can be omitted here as we use iterators over Point_3 elements.
|
||||||
points->unoriented_points_begin() =
|
points->unoriented_points_begin() =
|
||||||
CGAL::mst_orient_normals(points->begin(), points->end(),
|
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());
|
dialog.orientationNbNeighbors());
|
||||||
|
|
||||||
// Delete points with an unoriented normal (required by APSS and Poisson)
|
// Delete points with an unoriented normal (required by APSS and Poisson)
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ bool Point_set_scene_item::read_off_point_set(std::istream& stream)
|
||||||
bool ok = stream &&
|
bool ok = stream &&
|
||||||
CGAL::read_off_points_and_normals(stream,
|
CGAL::read_off_points_and_normals(stream,
|
||||||
std::back_inserter(*m_points),
|
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();
|
!isEmpty();
|
||||||
|
|
||||||
// Mark all normals as oriented
|
// Mark all normals as oriented
|
||||||
|
|
@ -87,7 +87,7 @@ bool Point_set_scene_item::write_off_point_set(std::ostream& stream) const
|
||||||
return stream &&
|
return stream &&
|
||||||
CGAL::write_off_points_and_normals(stream,
|
CGAL::write_off_points_and_normals(stream,
|
||||||
m_points->begin(), m_points->end(),
|
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
|
// 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 &&
|
bool ok = stream &&
|
||||||
CGAL::read_xyz_points_and_normals(stream,
|
CGAL::read_xyz_points_and_normals(stream,
|
||||||
std::back_inserter(*m_points),
|
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();
|
!isEmpty();
|
||||||
|
|
||||||
// Mark all normals as oriented
|
// Mark all normals as oriented
|
||||||
|
|
@ -116,7 +116,7 @@ bool Point_set_scene_item::write_xyz_point_set(std::ostream& stream) const
|
||||||
return stream &&
|
return stream &&
|
||||||
CGAL::write_xyz_points_and_normals(stream,
|
CGAL::write_xyz_points_and_normals(stream,
|
||||||
m_points->begin(), m_points->end(),
|
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
|
QString
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
#define POINT_SET_3_H
|
#define POINT_SET_3_H
|
||||||
|
|
||||||
#include <CGAL/Point_with_normal_3.h>
|
#include <CGAL/Point_with_normal_3.h>
|
||||||
#include <CGAL/point_set_property_map.h>
|
#include <CGAL/property_map.h>
|
||||||
#include <CGAL/Min_sphere_d.h>
|
#include <CGAL/Min_sphere_d.h>
|
||||||
#include <CGAL/Optimisation_d_traits_3.h>
|
#include <CGAL/Optimisation_d_traits_3.h>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -237,7 +237,7 @@ BOOL CPoissonDoc::OnOpenDocument(LPCTSTR lpszPathName)
|
||||||
if( ! stream ||
|
if( ! stream ||
|
||||||
! CGAL::read_off_points_and_normals(stream,
|
! CGAL::read_off_points_and_normals(stream,
|
||||||
std::back_inserter(m_points),
|
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");
|
prompt_message("Unable to read file");
|
||||||
update_status();
|
update_status();
|
||||||
|
|
@ -253,7 +253,7 @@ BOOL CPoissonDoc::OnOpenDocument(LPCTSTR lpszPathName)
|
||||||
if( ! stream ||
|
if( ! stream ||
|
||||||
! CGAL::read_xyz_points_and_normals(stream,
|
! CGAL::read_xyz_points_and_normals(stream,
|
||||||
std::back_inserter(m_points),
|
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");
|
prompt_message("Unable to read file");
|
||||||
update_status();
|
update_status();
|
||||||
|
|
@ -364,7 +364,7 @@ void CPoissonDoc::OnFileSaveAs()
|
||||||
ok = stream &&
|
ok = stream &&
|
||||||
CGAL::write_xyz_points_and_normals(stream,
|
CGAL::write_xyz_points_and_normals(stream,
|
||||||
m_points.begin(), m_points.end(),
|
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
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -389,7 +389,7 @@ void CPoissonDoc::OnFileSaveAs()
|
||||||
ok = stream &&
|
ok = stream &&
|
||||||
CGAL::write_off_points_and_normals(stream,
|
CGAL::write_off_points_and_normals(stream,
|
||||||
m_points.begin(), m_points.end(),
|
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
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -705,7 +705,7 @@ void CPoissonDoc::OnAlgorithmsEstimateNormalsByPCA()
|
||||||
m_nb_neighbors_pca_normals, nb_neighbors);
|
m_nb_neighbors_pca_normals, nb_neighbors);
|
||||||
|
|
||||||
CGAL::pca_estimate_normals(m_points.begin(), m_points.end(),
|
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);
|
nb_neighbors);
|
||||||
|
|
||||||
// Mark all normals as unoriented
|
// Mark all normals as unoriented
|
||||||
|
|
@ -742,7 +742,7 @@ void CPoissonDoc::OnAlgorithmsEstimateNormalsByJetFitting()
|
||||||
m_nb_neighbors_jet_fitting_normals, nb_neighbors);
|
m_nb_neighbors_jet_fitting_normals, nb_neighbors);
|
||||||
|
|
||||||
CGAL::jet_estimate_normals(m_points.begin(), m_points.end(),
|
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);
|
nb_neighbors);
|
||||||
|
|
||||||
// Mark all normals as unoriented
|
// 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.
|
// The position property map can be omitted here as we use iterators over Point_3 elements.
|
||||||
m_points.unoriented_points_begin() =
|
m_points.unoriented_points_begin() =
|
||||||
CGAL::mst_orient_normals(m_points.begin(), m_points.end(),
|
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);
|
m_nb_neighbors_mst);
|
||||||
|
|
||||||
// Check the accuracy of normal orientation.
|
// 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.
|
// The position property map can be omitted here as we use iterators over Point_3 elements.
|
||||||
assert(m_poisson_function == NULL);
|
assert(m_poisson_function == NULL);
|
||||||
m_poisson_function = new Poisson_reconstruction_function(m_points.begin(), m_points.end(),
|
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
|
// Prints status
|
||||||
status_message("Creates Poisson triangulation...done (%.2lf s)", task_timer.time());
|
status_message("Creates Poisson triangulation...done (%.2lf s)", task_timer.time());
|
||||||
|
|
@ -1178,7 +1178,7 @@ void CPoissonDoc::OnReconstructionApssReconstruction()
|
||||||
|
|
||||||
// Creates implicit function
|
// Creates implicit function
|
||||||
m_apss_function = new APSS_reconstruction_function(m_points.begin(), m_points.end(),
|
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);
|
m_smoothness_apss);
|
||||||
|
|
||||||
// Gets point inside the implicit surface
|
// Gets point inside the implicit surface
|
||||||
|
|
@ -1344,7 +1344,7 @@ void CPoissonDoc::OnRadialNormalOrientation()
|
||||||
|
|
||||||
m_points.unoriented_points_begin() =
|
m_points.unoriented_points_begin() =
|
||||||
CGAL::radial_orient_normals(m_points.begin(), m_points.end(),
|
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.
|
// Check the accuracy of normal orientation.
|
||||||
// If original normals are available, compare with them.
|
// If original normals are available, compare with them.
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
#define POINT_SET_3_H
|
#define POINT_SET_3_H
|
||||||
|
|
||||||
#include <CGAL/Point_with_normal_3.h>
|
#include <CGAL/Point_with_normal_3.h>
|
||||||
#include <CGAL/point_set_property_map.h>
|
#include <CGAL/property_map.h>
|
||||||
#include <CGAL/Min_sphere_d.h>
|
#include <CGAL/Min_sphere_d.h>
|
||||||
#include <CGAL/Optimisation_d_traits_3.h>
|
#include <CGAL/Optimisation_d_traits_3.h>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
\ccPkgDependsOn{\ccThirdPartyTaucs}
|
\ccPkgDependsOn{\ccThirdPartyTaucs}
|
||||||
\ccPkgIntroducedInCGAL{3.5}
|
\ccPkgIntroducedInCGAL{3.5}
|
||||||
\ccPkgLicense{\ccLicenseQPL}
|
\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}
|
\ccPkgIllustration{Surface_reconstruction_points_3/fig/surface_reconstruction_points_detail.png}{Surface_reconstruction_points_3/fig/surface_reconstruction_points.jpg}
|
||||||
|
|
||||||
\end{ccPkgDescription}
|
\end{ccPkgDescription}
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
// This package
|
// This package
|
||||||
#include <CGAL/APSS_reconstruction_function.h>
|
#include <CGAL/APSS_reconstruction_function.h>
|
||||||
#include <CGAL/Point_with_normal_3.h>
|
#include <CGAL/Point_with_normal_3.h>
|
||||||
#include <CGAL/point_set_property_map.h>
|
#include <CGAL/property_map.h>
|
||||||
#include <CGAL/IO/read_xyz_points.h>
|
#include <CGAL/IO/read_xyz_points.h>
|
||||||
#include <CGAL/IO/output_surface_facets_to_polyhedron.h>
|
#include <CGAL/IO/output_surface_facets_to_polyhedron.h>
|
||||||
|
|
||||||
|
|
@ -155,7 +155,7 @@ int main(int argc, char * argv[])
|
||||||
!CGAL::read_xyz_points_and_normals(
|
!CGAL::read_xyz_points_and_normals(
|
||||||
stream,
|
stream,
|
||||||
std::back_inserter(points),
|
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;
|
std::cerr << "Error: cannot read file " << input_filename << std::endl;
|
||||||
return EXIT_FAILURE;
|
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.
|
// The position property map can be omitted here as we use iterators over Point_3 elements.
|
||||||
APSS_reconstruction_function implicit_function(
|
APSS_reconstruction_function implicit_function(
|
||||||
points.begin(), points.end(),
|
points.begin(), points.end(),
|
||||||
CGAL::make_normal_vector_property_map(points.begin()),
|
CGAL::make_normal_of_point_with_normal_pmap(points.begin()),
|
||||||
smoothness);
|
smoothness);
|
||||||
|
|
||||||
// Recover memory used by points[]
|
// Recover memory used by points[]
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
// This package
|
// This package
|
||||||
#include <CGAL/Poisson_reconstruction_function.h>
|
#include <CGAL/Poisson_reconstruction_function.h>
|
||||||
#include <CGAL/Point_with_normal_3.h>
|
#include <CGAL/Point_with_normal_3.h>
|
||||||
#include <CGAL/point_set_property_map.h>
|
#include <CGAL/property_map.h>
|
||||||
#include <CGAL/IO/read_xyz_points.h>
|
#include <CGAL/IO/read_xyz_points.h>
|
||||||
|
|
||||||
#include "compute_normal.h"
|
#include "compute_normal.h"
|
||||||
|
|
@ -149,7 +149,7 @@ int main(int argc, char * argv[])
|
||||||
!CGAL::read_xyz_points_and_normals(
|
!CGAL::read_xyz_points_and_normals(
|
||||||
stream,
|
stream,
|
||||||
std::back_inserter(points),
|
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;
|
std::cerr << "Error: cannot read file " << input_filename << std::endl;
|
||||||
return EXIT_FAILURE;
|
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.
|
// The position property map can be omitted here as we use iterators over Point_3 elements.
|
||||||
Poisson_reconstruction_function implicit_function(
|
Poisson_reconstruction_function implicit_function(
|
||||||
points.begin(), points.end(),
|
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[]
|
// Recover memory used by points[]
|
||||||
points.clear();
|
points.clear();
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
#include <CGAL/IO/Complex_2_in_triangulation_3_file_writer.h>
|
#include <CGAL/IO/Complex_2_in_triangulation_3_file_writer.h>
|
||||||
#include <CGAL/Poisson_reconstruction_function.h>
|
#include <CGAL/Poisson_reconstruction_function.h>
|
||||||
#include <CGAL/Point_with_normal_3.h>
|
#include <CGAL/Point_with_normal_3.h>
|
||||||
#include <CGAL/point_set_property_map.h>
|
#include <CGAL/property_map.h>
|
||||||
#include <CGAL/IO/read_xyz_points.h>
|
#include <CGAL/IO/read_xyz_points.h>
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
@ -40,7 +40,7 @@ int main(void)
|
||||||
!CGAL::read_xyz_points_and_normals(
|
!CGAL::read_xyz_points_and_normals(
|
||||||
stream,
|
stream,
|
||||||
std::back_inserter(points),
|
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;
|
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.
|
// The position property map can be omitted here as we use iterators over Point_3 elements.
|
||||||
Poisson_reconstruction_function implicit_function(
|
Poisson_reconstruction_function implicit_function(
|
||||||
points.begin(), points.end(),
|
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()
|
// Computes the Poisson indicator function f()
|
||||||
// at each vertex of the triangulation.
|
// at each vertex of the triangulation.
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include <CGAL/point_set_property_map.h>
|
#include <CGAL/property_map.h>
|
||||||
#include <CGAL/Point_with_normal_3.h>
|
#include <CGAL/Point_with_normal_3.h>
|
||||||
#include <CGAL/Fast_orthogonal_k_neighbor_search.h>
|
#include <CGAL/Fast_orthogonal_k_neighbor_search.h>
|
||||||
#include <CGAL/Search_traits_3.h>
|
#include <CGAL/Search_traits_3.h>
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
#include <CGAL/spatial_sort.h>
|
#include <CGAL/spatial_sort.h>
|
||||||
#include <CGAL/taucs_solver.h>
|
#include <CGAL/taucs_solver.h>
|
||||||
#include <CGAL/centroid.h>
|
#include <CGAL/centroid.h>
|
||||||
#include <CGAL/point_set_property_map.h>
|
#include <CGAL/property_map.h>
|
||||||
#include <CGAL/surface_reconstruction_points_assertions.h>
|
#include <CGAL/surface_reconstruction_points_assertions.h>
|
||||||
#include <CGAL/Memory_sizer.h>
|
#include <CGAL/Memory_sizer.h>
|
||||||
#include <CGAL/Peak_memory_sizer.h>
|
#include <CGAL/Peak_memory_sizer.h>
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
#include <CGAL/Point_with_normal_3.h>
|
#include <CGAL/Point_with_normal_3.h>
|
||||||
#include <CGAL/Lightweight_vector_3.h>
|
#include <CGAL/Lightweight_vector_3.h>
|
||||||
#include <CGAL/point_set_property_map.h>
|
#include <CGAL/property_map.h>
|
||||||
#include <CGAL/surface_reconstruction_points_assertions.h>
|
#include <CGAL/surface_reconstruction_points_assertions.h>
|
||||||
|
|
||||||
#include <CGAL/Delaunay_triangulation_3.h>
|
#include <CGAL/Delaunay_triangulation_3.h>
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
// This package
|
// This package
|
||||||
#include <CGAL/APSS_reconstruction_function.h>
|
#include <CGAL/APSS_reconstruction_function.h>
|
||||||
#include <CGAL/Point_with_normal_3.h>
|
#include <CGAL/Point_with_normal_3.h>
|
||||||
#include <CGAL/point_set_property_map.h>
|
#include <CGAL/property_map.h>
|
||||||
#include <CGAL/IO/read_xyz_points.h>
|
#include <CGAL/IO/read_xyz_points.h>
|
||||||
#include <CGAL/IO/output_surface_facets_to_polyhedron.h>
|
#include <CGAL/IO/output_surface_facets_to_polyhedron.h>
|
||||||
|
|
||||||
|
|
@ -146,7 +146,7 @@ int main(int argc, char * argv[])
|
||||||
!CGAL::read_xyz_points_and_normals(
|
!CGAL::read_xyz_points_and_normals(
|
||||||
stream,
|
stream,
|
||||||
std::back_inserter(points),
|
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;
|
std::cerr << "Error: cannot read file " << input_filename << std::endl;
|
||||||
accumulated_fatal_err = EXIT_FAILURE;
|
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.
|
// The position property map can be omitted here as we use iterators over Point_3 elements.
|
||||||
APSS_reconstruction_function implicit_function(
|
APSS_reconstruction_function implicit_function(
|
||||||
points.begin(), points.end(),
|
points.begin(), points.end(),
|
||||||
CGAL::make_normal_vector_property_map(points.begin()),
|
CGAL::make_normal_of_point_with_normal_pmap(points.begin()),
|
||||||
smoothness);
|
smoothness);
|
||||||
|
|
||||||
// Recover memory used by points[]
|
// Recover memory used by points[]
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
// This package
|
// This package
|
||||||
#include <CGAL/Poisson_reconstruction_function.h>
|
#include <CGAL/Poisson_reconstruction_function.h>
|
||||||
#include <CGAL/Point_with_normal_3.h>
|
#include <CGAL/Point_with_normal_3.h>
|
||||||
#include <CGAL/point_set_property_map.h>
|
#include <CGAL/property_map.h>
|
||||||
#include <CGAL/IO/read_xyz_points.h>
|
#include <CGAL/IO/read_xyz_points.h>
|
||||||
|
|
||||||
#include "compute_normal.h"
|
#include "compute_normal.h"
|
||||||
|
|
@ -143,7 +143,7 @@ int main(int argc, char * argv[])
|
||||||
!CGAL::read_xyz_points_and_normals(
|
!CGAL::read_xyz_points_and_normals(
|
||||||
stream,
|
stream,
|
||||||
std::back_inserter(points),
|
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;
|
std::cerr << "Error: cannot read file " << input_filename << std::endl;
|
||||||
accumulated_fatal_err = EXIT_FAILURE;
|
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.
|
// The position property map can be omitted here as we use iterators over Point_3 elements.
|
||||||
Poisson_reconstruction_function implicit_function(
|
Poisson_reconstruction_function implicit_function(
|
||||||
points.begin(), points.end(),
|
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[]
|
// Recover memory used by points[]
|
||||||
points.clear();
|
points.clear();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue