"Fossies" - the Fresh Open Source Software Archive

Member "doc_html/Poisson_surface_reconstruction_3/xml/Poisson_surface_reconstruction_3_2poisson_reconstruction_function_8cpp-example.xml" (8 Nov 2019, 8587 Bytes) of package /linux/misc/CGAL-5.0-doc_html.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) XML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "Poisson_surface_reconstruction_3_2poisson_reconstruction_function_8cpp-example.xml": 4.12.1-doc_html_vs_4.13-doc_html.

    1 <?xml version='1.0' encoding='UTF-8' standalone='no'?>
    2 <doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.8.13">
    3   <compounddef id="Poisson_surface_reconstruction_3_2poisson_reconstruction_function_8cpp-example" kind="example">
    4     <compoundname>Poisson_surface_reconstruction_3/poisson_reconstruction_function.cpp</compoundname>
    5     <detaileddescription>
    6 <para><programlisting><codeline><highlight class="preprocessor">#include<sp/>&lt;CGAL/Exact_predicates_inexact_constructions_kernel.h&gt;</highlight><highlight class="normal"></highlight></codeline>
    7 <codeline><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;CGAL/Polyhedron_3.h&gt;</highlight><highlight class="normal"></highlight></codeline>
    8 <codeline><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;CGAL/poisson_surface_reconstruction.h&gt;</highlight><highlight class="normal"></highlight></codeline>
    9 <codeline><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;CGAL/IO/read_xyz_points.h&gt;</highlight><highlight class="normal"></highlight></codeline>
   10 <codeline><highlight class="normal"></highlight></codeline>
   11 <codeline><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;vector&gt;</highlight><highlight class="normal"></highlight></codeline>
   12 <codeline><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;fstream&gt;</highlight><highlight class="normal"></highlight></codeline>
   13 <codeline><highlight class="normal"></highlight></codeline>
   14 <codeline><highlight class="normal"></highlight><highlight class="comment">//<sp/>Types</highlight><highlight class="normal"></highlight></codeline>
   15 <codeline><highlight class="normal"></highlight><highlight class="keyword">typedef</highlight><highlight class="normal"><sp/><ref refid="classCGAL_1_1Exact__predicates__inexact__constructions__kernel" kindref="compound" external="/home/cgal-testsuite/cgal_doc_build/CGAL-5.0-I-190/doc/scripts/build_doc/doc_tags/Kernel_23.tag">CGAL::Exact_predicates_inexact_constructions_kernel</ref><sp/>Kernel;</highlight></codeline>
   16 <codeline><highlight class="normal"></highlight><highlight class="keyword">typedef</highlight><highlight class="normal"><sp/><ref refid="classKernel_1_1Point__3" kindref="compound" external="/home/cgal-testsuite/cgal_doc_build/CGAL-5.0-I-190/doc/scripts/build_doc/doc_tags/Kernel_23.tag">Kernel::Point_3</ref><sp/>Point;</highlight></codeline>
   17 <codeline><highlight class="normal"></highlight><highlight class="keyword">typedef</highlight><highlight class="normal"><sp/><ref refid="classKernel_1_1Vector__3" kindref="compound" external="/home/cgal-testsuite/cgal_doc_build/CGAL-5.0-I-190/doc/scripts/build_doc/doc_tags/Kernel_23.tag">Kernel::Vector_3</ref><sp/>Vector;</highlight></codeline>
   18 <codeline><highlight class="normal"></highlight><highlight class="keyword">typedef</highlight><highlight class="normal"><sp/>std::pair&lt;Point,<sp/>Vector&gt;<sp/>Pwn;</highlight></codeline>
   19 <codeline><highlight class="normal"></highlight><highlight class="keyword">typedef</highlight><highlight class="normal"><sp/>CGAL::Polyhedron_3&lt;Kernel&gt;<sp/>Polyhedron;</highlight></codeline>
   20 <codeline><highlight class="normal"></highlight></codeline>
   21 <codeline><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>main(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)</highlight></codeline>
   22 <codeline><highlight class="normal">{</highlight></codeline>
   23 <codeline><highlight class="normal"><sp/><sp/>std::vector&lt;Pwn&gt;<sp/>points;</highlight></codeline>
   24 <codeline><highlight class="normal"><sp/><sp/>std::ifstream<sp/>stream(</highlight><highlight class="stringliteral">&quot;data/kitten.xyz&quot;</highlight><highlight class="normal">);</highlight></codeline>
   25 <codeline><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!stream<sp/>||</highlight></codeline>
   26 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>!<ref refid="group__PkgPointSetProcessing3IO_1ga2e8d677def85c5582ba1f01eda030628" kindref="member" external="/home/cgal-testsuite/cgal_doc_build/CGAL-5.0-I-190/doc/scripts/build_doc/doc_tags/Point_set_processing_3.tag">CGAL::read_xyz_points</ref>(</highlight></codeline>
   27 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>stream,</highlight></codeline>
   28 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>std::back_inserter(points),</highlight></codeline>
   29 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>CGAL::parameters::point_map(CGAL::First_of_pair_property_map&lt;Pwn&gt;()).</highlight></codeline>
   30 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>normal_map(CGAL::Second_of_pair_property_map&lt;Pwn&gt;())))</highlight></codeline>
   31 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
   32 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>std::cerr<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;Error:<sp/>cannot<sp/>read<sp/>file<sp/>data/kitten.xyz&quot;</highlight><highlight class="normal"><sp/>&lt;&lt;<sp/>std::endl;</highlight></codeline>
   33 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>EXIT_FAILURE;</highlight></codeline>
   34 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
   35 <codeline><highlight class="normal"></highlight></codeline>
   36 <codeline><highlight class="normal"><sp/><sp/>Polyhedron<sp/>output_mesh;</highlight></codeline>
   37 <codeline><highlight class="normal"><sp/><sp/></highlight></codeline>
   38 <codeline><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>average_spacing<sp/>=<sp/>CGAL::compute_average_spacing&lt;CGAL::Sequential_tag&gt;</highlight></codeline>
   39 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/>(points,<sp/>6,<sp/>CGAL::parameters::point_map(CGAL::First_of_pair_property_map&lt;Pwn&gt;()));</highlight></codeline>
   40 <codeline><highlight class="normal"></highlight></codeline>
   41 <codeline><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="group__PkgPoissonSurfaceReconstruction3Ref_1ga2470854cf03552ecee02f11c17024ddf" kindref="member">CGAL::poisson_surface_reconstruction_delaunay</ref></highlight></codeline>
   42 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>(points.begin(),<sp/>points.end(),</highlight></codeline>
   43 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>CGAL::First_of_pair_property_map&lt;Pwn&gt;(),</highlight></codeline>
   44 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>CGAL::Second_of_pair_property_map&lt;Pwn&gt;(),</highlight></codeline>
   45 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>output_mesh,<sp/>average_spacing))</highlight></codeline>
   46 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
   47 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>std::ofstream<sp/>out(</highlight><highlight class="stringliteral">&quot;kitten_poisson-20-30-0.375.off&quot;</highlight><highlight class="normal">);</highlight></codeline>
   48 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>out<sp/>&lt;&lt;<sp/>output_mesh;</highlight></codeline>
   49 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
   50 <codeline><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
   51 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>EXIT_FAILURE;</highlight></codeline>
   52 <codeline><highlight class="normal"></highlight></codeline>
   53 <codeline><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>EXIT_SUCCESS;</highlight></codeline>
   54 <codeline><highlight class="normal">}</highlight></codeline>
   55 </programlisting> </para>    </detaileddescription>
   56   </compounddef>
   57 </doxygen>