Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Voronoi Infinite Points

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Voronoi Infinite Points


Chronological Thread 
  • From: "Wesley Smith" <>
  • To:
  • Subject: Re: [cgal-discuss] Voronoi Infinite Points
  • Date: Sun, 12 Aug 2007 01:03:19 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=jOLAbiBYf3mPNPnNqoaF2CyTXUtB8kU75niL0DiT7jS7oNgzRR+cAN/Cr4e+Iyn5yRUDzA7uWuQKn+iqRf58687V1rmF0CX4RKoyS6R3Bqeg/TIxMnuq4FwE0gWpXMBDA9aKs3Q94ZhyM6cuMuD1R6kxqJ24Fx1YjquMkp/pzig=

Thanks. So more specifically in terms of code, I can't figure out how
to bisect 2 points given a Voronoi_diagram_2 and a ray halfedge. I'm
still pretty bewildered by the structure of CGAL when it comes to
traits and predicates etc.

Here's what I have:

typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Delaunay_triangulation_2<K> DT;
typedef CGAL::Delaunay_triangulation_adaptation_traits_2<DT> AT;
typedef CGAL::Delaunay_triangulation_caching_degeneracy_removal_policy_2<DT>
AP;
typedef CGAL::Voronoi_diagram_2<DT,AT,AP> VD;
typedef CGAL::Line_2<K> Line_2;
typedef CGAL::Vector_2<K> Vector_2;
typedef DT::Geom_traits Geom_traits;

Voronoi_diagram_2 vd2;
Edge_iterator edge_iter = vd2->edges_begin();

while(edge_iter != self->edges_end()) {
if(edge_iter->is_ray()) {
if(edge_iter->has_source()) {
Vertex_handle v = edge_iter->source();
Point_2 p = v->point();

Delaunay_vertex_handle v2 =
edge_iter->down();
Point_2 p2 = v2->point();

Line_2 l =
Geom_traits::Construct_bisector_2(edge_iter->up()->point(),
edge_iter->down()->point());

Vector_2 dir_vec = l.direction();
}

These are the errors I'm getting. I don't really know enough about
how CGAL partitions things template-wise to understand how to
interpret this. Any ideas?

/Users/whsmith/Documents/Jitter-Dev/jit.gl.lua/Lua_dev/luaCGAL/voronoi_diagram_2_udata.cpp:151:
error: no matching function for call to
'CGAL::CartesianKernelFunctors::Construct_bisector_2<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double>
> >::Construct_bisector_2(CGAL::Point_2<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double>
> >&, CGAL::Point_2<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double>
> >&)'


/usr/local/CGAL/include/CGAL/Cartesian/function_objects.h:1634: note:
candidates are:
CGAL::CartesianKernelFunctors::Construct_bisector_2<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double>
> >::Construct_bisector_2()


/usr/local/CGAL/include/CGAL/Cartesian/function_objects.h:1634: note:

CGAL::CartesianKernelFunctors::Construct_bisector_2<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double>
> >::Construct_bisector_2(const
CGAL::CartesianKernelFunctors::Construct_bisector_2<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double>
> >&)


/Users/whsmith/Documents/Jitter-Dev/jit.gl.lua/Lua_dev/luaCGAL/voronoi_diagram_2_udata.cpp:155:
error: conversion from
'CGAL::Direction_2<CGAL::Filtered_kernel<CGAL::Simple_cartesian<double>
> >' to non-scalar type 'CGAL::Vector_2<cgal::K>' requested


thanks,
wes



Archive powered by MHonArc 2.6.16.

Top of Page