Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] adding additional variables in 3D triangulation data structure

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] adding additional variables in 3D triangulation data structure


Chronological Thread 
  • From: Adam Getchell <>
  • To:
  • Subject: Re: [cgal-discuss] adding additional variables in 3D triangulation data structure
  • Date: Fri, 15 Jul 2016 16:25:03 -0700
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:bnphfRdAjJzcNIUyUGXMbW+LlGMj4u6mDksu8pMizoh2WeGdxc65bB7h7PlgxGXEQZ/co6odzbGH6+a8BCdavN6oizMrSNR0TRgLiMEbzUQLIfWuLgnFFsPsdDEwB89YVVVorDmROElRH9viNRWJ+iXhpQAbFhi3DwdpPOO9QteU1JXvkbzvsMeOKyxzxxOFKYtoKxu3qQiD/uI3uqBFbpgL9x3Sv3FTcP5Xz247bXianhL7+9vitMU7q3cY6Lod8JtLXqz+Oqg5VrdFFy8OMmYv5cStuwOQYxGI4y41XmwT2jVFHwPF4RX+FsP4viL/8OVwxCKaMMnyZb8xUDWmqaxsTUm72288Kzcl/TSP2YRLh6VBrUf5qg==


> On Jul 15, 2016, at 3:59 AM, Tianyun Su
> <>
> wrote:
>
> Hi,
> I want to add some additional variables in the CGAL's 3D triangulation
> data structures, like vertex and cell, in order to record some
> information during analysis.

Use CGAL/Triangulation_vertex_base_with_info_3.h and
Triangulation_cell_base_with_info_3.h.

For example, if you want to add an unsigned integer to both structures, you
can do something like:


// CGAL headers
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Triangulation_vertex_base_with_info_3.h>
#include <CGAL/Triangulation_cell_base_with_info_3.h>
#include <CGAL/Delaunay_triangulation_3.h>

using K = CGAL::Exact_predicates_inexact_constructions_kernel;
using Triangulation = CGAL::Triangulation_3<K>;
// Used so that each timeslice is assigned an integer
using Vb = CGAL::Triangulation_vertex_base_with_info_3<std::uintmax_t, K>;
// Used to mark cell type
using Cb = CGAL::Triangulation_cell_base_with_info_3<std::uintmax_t, K>;


Adam
--
Adam Getchell
about.me/adamgetchell




Archive powered by MHonArc 2.6.18.

Top of Page