Subject: CGAL users discussion list
List archive
- From: Clément Jamin <>
- To:
- Subject: Re: [cgal-discuss] Attaching Data to dD Delaunay Triangulation Vertices
- Date: Tue, 8 Sep 2015 10:42:30 +0200
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:Uxq1VBKJdeSoTFhXENmcpTZWNBhigK39O0sv0rFitYgVKv3xwZ3uMQTl6Ol3ixeRBMOAu64C0rCd6/qocFdDyKjCmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TWM5DIfUi/yKRBybrysXNWC04LujavqodX6WEZhunmUWftKNhK4rAHc5IE9oLBJDeIP8CbPuWZCYO9MxGlldhq5lhf44dqsrtY4q3wD86FpyshbTK+vf7gkVacKS3M9ImUt7YvqswPCRE2B/DwHQ2AOm11JBQbCqxr1V5O0virhvfdmw3qmOpj9QrkwHDij9Kx2UwTAiSEdNjd//nuEpNZ3ifdwpJOkqhpj9KzdZYCTfK51eq7YcNUGA2hIW8dXETRbBauzaoIOC6wKOuMO/Nq1nEcHsRbrXVrkP+jo0DId3nI=
Hi,
On Tue, Sep 8, 2015 at 8:53 AM, Scherrer Daniel
<>
wrote:
> Can someone explain how user data can be stored in the Vertices of a dD
> Delaunay Triangulation?
> In the "delaunay_triangulation.cpp" example I tried to change the lines
>
> const int D=5;
> typedef CGAL::Epick_d< CGAL::Dimension_tag<D> > K;
> typedef CGAL::Delaunay_triangulation<K> T;
>
> to
>
> struct MyData {
> double value;
> };
>
> const int D = 5;
> typedef CGAL::Epick_d<CGAL::Dimension_tag<D>> K;
> typedef CGAL::Triangulation_data_structure<K,
> CGAL::Triangulation_vertex<K, MyData>, CGAL::Triangulation_full_cell<K>>
> Tds;
> typedef CGAL::Delaunay_triangulation<K, Tds> T;
The first parameter of CGAL::Triangulation_data_structure should be
the dimension, not the kernel. See
http://doc.cgal.org/latest/Triangulation/classCGAL_1_1Triangulation__data__structure.html
So:
typedef CGAL::Triangulation_data_structure<CGAL::Dimension_tag<D>,
CGAL::Triangulation_vertex<K, MyData>,
CGAL::Triangulation_full_cell<K>> Tds;
Hope this helps,
Clément
> But the first time type "T" is used, I get compiler errors that I do not
> fully understand as I am not so used to work with templates:
>
> 1>C:\Program
> Files\CGAL-4.6.2\include\CGAL/TDS_full_cell_default_storage_policy.h(41):
> error C2027: use of undefined type 'CGAL::internal::Dimen_plus_one<Dimen>'
> 1> with
> 1> [
> 1> Dimen=CGAL::Epick_d<CGAL::Dimension_tag<3>>
> 1> ]
> 1> C:\Program
> Files\CGAL-4.6.2\include\CGAL/Triangulation_ds_full_cell.h(60) : see
> reference to class template instantiation
> 'CGAL::TFC_data<CGAL::internal::CC_iterator<CGAL::Compact_container<CGAL::Triangulation_vertex<TriangulationTraits,Data_,CGAL::Triangulation_ds_vertex<TDS2>>,CGAL::Default,CGAL::Default,CGAL::Default>,false>,CGAL::internal::CC_iterator<CGAL::Compact_container<CGAL::Triangulation_full_cell<TriangulationTraits,CGAL::No_full_cell_data,CGAL::Triangulation_ds_full_cell<TDS2,StoragePolicy>>,CGAL::Default,CGAL::Default,CGAL::Default>,false>,CGAL::Epick_d<CGAL::Dimension_tag<3>>,CGAL::TDS_full_cell_default_storage_policy>'
> being compiled
> 1> with
> 1> [
> 1> TriangulationTraits=K
> 1> , Data_=MyData
> 1> ,
> TDS2=CGAL::Triangulation_data_structure<K,CGAL::Triangulation_vertex<K,MyData,CGAL::Default>,CGAL::Triangulation_full_cell<K,CGAL::No_full_cell_data,CGAL::Default>>
> 1> , StoragePolicy=CGAL::Default
> 1> ]
> 1> C:\Program
> Files\CGAL-4.6.2\include\CGAL/Triangulation_full_cell.h(34) : see reference
> to class template instantiation
> 'CGAL::Triangulation_ds_full_cell<TDS2,StoragePolicy>' being compiled
> 1> with
> 1> [
> 1>
> TDS2=CGAL::Triangulation_data_structure<K,CGAL::Triangulation_vertex<K,MyData,CGAL::Default>,CGAL::Triangulation_full_cell<K,CGAL::No_full_cell_data,CGAL::Default>>
> 1> , StoragePolicy=CGAL::Default
> 1> ]
> 1> C:\Program Files\CGAL-4.6.2\include\CGAL/Triangulation.h(203) :
> see reference to class template instantiation
> 'CGAL::Triangulation_full_cell<TriangulationTraits,Data_,CGAL::Triangulation_ds_full_cell<TDS2,StoragePolicy>>'
> being compiled
> 1> with
> 1> [
> 1> TriangulationTraits=K
> 1> , Data_=CGAL::No_full_cell_data
> 1> ,
> TDS2=CGAL::Triangulation_data_structure<K,CGAL::Triangulation_vertex<K,MyData,CGAL::Default>,CGAL::Triangulation_full_cell<K,CGAL::No_full_cell_data,CGAL::Default>>
> 1> , StoragePolicy=CGAL::Default
> 1> ]
> 1> C:\Program
> Files\CGAL-4.6.2\include\CGAL/Delaunay_triangulation.h(41) : see reference
> to class template instantiation
> 'CGAL::Triangulation<DCTraits,CGAL::Triangulation_data_structure<K,CGAL::Triangulation_vertex<K,MyData,CGAL::Default>,CGAL::Triangulation_full_cell<K,CGAL::No_full_cell_data,CGAL::Default>>>'
> being compiled
> 1> with
> 1> [
> 1> DCTraits=K
> 1> ]
> 1> src\datalandscape\LinearLandscape6D.cpp(56) : see reference
> 1>to class template instantiation 'CGAL::Delaunay_triangulation<K,Tds>'
> being compiled C:\Program
> Files\CGAL-4.6.2\include\CGAL/TDS_full_cell_default_storage_policy.h(41):
> error C2146: syntax error : missing ';' before identifier 'Dimen_plus'
> 1>C:\Program
> 1>Files\CGAL-4.6.2\include\CGAL/TDS_full_cell_default_storage_policy.h(4
> 1>1): error C4430: missing type specifier - int assumed. Note: C++ does not
> support default-int C:\Program
> Files\CGAL-4.6.2\include\CGAL/TDS_full_cell_default_storage_policy.h(42):
> error C2065: 'Dimen_plus' : undeclared identifier C:\Program
> Files\CGAL-4.6.2\include\CGAL/TDS_full_cell_default_storage_policy.h(42):
> error C2923: 'CGAL::internal::S_or_D_array' : 'Dimen_plus' is not a valid
> template type argument for parameter 'D'
> 1>C:\Program
> 1>Files\CGAL-4.6.2\include\CGAL/TDS_full_cell_default_storage_policy.h(43):
> error C2065: 'Dimen_plus' : undeclared identifier C:\Program
> Files\CGAL-4.6.2\include\CGAL/TDS_full_cell_default_storage_policy.h(43):
> error C2923: 'CGAL::internal::S_or_D_array' : 'Dimen_plus' is not a valid
> template type argument for parameter 'D'
> 1>C:\Program
> Files\CGAL-4.6.2\include\CGAL/TDS_full_cell_default_storage_policy.h(45):
> error C2079:
> 'CGAL::TFC_data<CGAL::internal::CC_iterator<CGAL::Compact_container<CGAL::Triangulation_vertex<TriangulationTraits,Data_,CGAL::Triangulation_ds_vertex<TDS2>>,CGAL::Default,CGAL::Default,CGAL::Default>,false>,CGAL::internal::CC_iterator<CGAL::Compact_container<CGAL::Triangulation_full_cell<TriangulationTraits,CGAL::No_full_cell_data,CGAL::Triangulation_ds_full_cell<TDS2,StoragePolicy>>,CGAL::Default,CGAL::Default,CGAL::Default>,false>,CGAL::Epick_d<CGAL::Dimension_tag<3>>,CGAL::TDS_full_cell_default_storage_policy>::vertices_'
> uses undefined struct 'CGAL::internal::S_or_D_array'
> 1> with
> 1> [
> 1> TriangulationTraits=K
> 1> , Data_=MyData
> 1> ,
> TDS2=CGAL::Triangulation_data_structure<K,CGAL::Triangulation_vertex<K,MyData,CGAL::Default>,CGAL::Triangulation_full_cell<K,CGAL::No_full_cell_data,CGAL::Default>>
> 1> , StoragePolicy=CGAL::Default
> 1> ]
> 1>C:\Program
> Files\CGAL-4.6.2\include\CGAL/TDS_full_cell_default_storage_policy.h(46):
> error C2079:
> 'CGAL::TFC_data<CGAL::internal::CC_iterator<CGAL::Compact_container<CGAL::Triangulation_vertex<TriangulationTraits,Data_,CGAL::Triangulation_ds_vertex<TDS2>>,CGAL::Default,CGAL::Default,CGAL::Default>,false>,CGAL::internal::CC_iterator<CGAL::Compact_container<CGAL::Triangulation_full_cell<TriangulationTraits,CGAL::No_full_cell_data,CGAL::Triangulation_ds_full_cell<TDS2,StoragePolicy>>,CGAL::Default,CGAL::Default,CGAL::Default>,false>,CGAL::Epick_d<CGAL::Dimension_tag<3>>,CGAL::TDS_full_cell_default_storage_policy>::neighbors_'
> uses undefined struct 'CGAL::internal::S_or_D_array'
> 1> with
> 1> [
> 1> TriangulationTraits=K
> 1> , Data_=MyData
> 1> ,
> TDS2=CGAL::Triangulation_data_structure<K,CGAL::Triangulation_vertex<K,MyData,CGAL::Default>,CGAL::Triangulation_full_cell<K,CGAL::No_full_cell_data,CGAL::Default>>
> 1> , StoragePolicy=CGAL::Default
> 1> ]
> 1>C:\Program
> Files\CGAL-4.6.2\include\CGAL/Triangulation_ds_full_cell.h(71): error
> C2955: 'CGAL::internal::S_or_D_array' : use of class template requires
> template argument list
> 1> C:\Program
> Files\CGAL-4.6.2\include\CGAL/internal/Static_or_dynamic_array.h(54) : see
> declaration of 'CGAL::internal::S_or_D_array'
> 1>C:\Program
> Files\CGAL-4.6.2\include\CGAL/Triangulation_ds_full_cell.h(71): error
> C2027: use of undefined type 'CGAL::internal::S_or_D_array'
> 1> C:\Program
> Files\CGAL-4.6.2\include\CGAL/internal/Static_or_dynamic_array.h(54) : see
> declaration of 'CGAL::internal::S_or_D_array'
> 1>C:\Program
> Files\CGAL-4.6.2\include\CGAL/Triangulation_ds_full_cell.h(71): error
> C2146: syntax error : missing ';' before identifier
> 'Vertex_handle_const_iterator'
> 1>C:\Program
> 1>Files\CGAL-4.6.2\include\CGAL/Triangulation_ds_full_cell.h(71): error
> C4430: missing type specifier - int assumed. Note: C++ does not support
> default-int C:\Program
> Files\CGAL-4.6.2\include\CGAL/Triangulation_ds_full_cell.h(72): error
> C2146: syntax error : missing ';' before identifier 'Vertex_handle_iterator'
> 1>C:\Program
> 1>Files\CGAL-4.6.2\include\CGAL/Triangulation_ds_full_cell.h(72): error
> 1>C4430: missing type specifier - int assumed. Note: C++ does not
> 1>support default-int
>
> Thanks,
> Daniel
>
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://sympa.inria.fr/sympa/info/cgal-discuss
>
>
- [cgal-discuss] Attaching Data to dD Delaunay Triangulation Vertices, Scherrer Daniel, 09/08/2015
- Re: [cgal-discuss] Attaching Data to dD Delaunay Triangulation Vertices, Clément Jamin, 09/08/2015
- RE: [cgal-discuss] Attaching Data to dD Delaunay Triangulation Vertices, Scherrer Daniel, 09/08/2015
- Re: [cgal-discuss] Attaching Data to dD Delaunay Triangulation Vertices, Clément Jamin, 09/08/2015
Archive powered by MHonArc 2.6.18.