Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] Inserting random spheres into Delaunay triangulations
- Date: Wed, 29 Oct 2014 08:15:17 +0100
- Organization: GeometryFactory
Scd is CGAL::Simple_cartesian<double> and the traits provided to the
triangulation is EPIC. The point types are different so you cannot
insert them. Replace Scd::Point_3 by K::Point_3 and it will work.
Sebastien.
On 10/29/2014 05:24 AM, Adam Getchell wrote:
Hello all,
I’m created nested spheres of random points (where each sphere of
differing radius represents a timeslice) that I’d like to triangulate.
I’m very close, but I’m not quite there:
inline void make_S3_triangulation(Delaunay* D3, int simplices, int
timeslices) {
// std::cout << "make_S3_triangulation() called " << std::endl;
const int points = simplices * 4;
const double radius = 1;
const bool message = false;
std::vector<Scd::Point_3> vertices;
make_3_sphere(&vertices, points, radius, message);
//D3->insert(vertices.begin(), vertices.end());
for (auto point : *vertices)
{
D3->insert(point);
}
}
Gives me this compiler error:
*Scanning dependencies of target cdt*
[ 14%] Building CXX object CMakeFiles/cdt.dir/src/cdt.cpp.o
In file included from /Users/adam/CDT-plusplus/src/cdt.cpp:24:
*/Users/adam/CDT-plusplus/src/S3Triangulation.h:49:21: **error:
**indirection*
* requires pointer operand ('std::vector<Scd::Point_3>' invalid)*
for (auto point : *vertices)
* ^~~~~~~~~*
1 error generated.
make[2]: *** [CMakeFiles/cdt.dir/src/cdt.cpp.o] Error 1
make[1]: *** [CMakeFiles/cdt.dir/all] Error 2
make: *** [all] Error 2
The relevant code is:
https://github.com/acgetchell/CDT-plusplus/blob/master/unittests/Triangulated2SphereTest.cpp
Which calls:
https://github.com/acgetchell/CDT-plusplus/blob/master/src/S3Triangulation.h
(offending lines commented out so everything else compiles)
Which calls:
https://github.com/acgetchell/CDT-plusplus/blob/master/src/Sphere_3.h
Pointers (or iterators) welcome!
Adam Getchell
about.me/adamgetchell <http://about.me/adamgetchell>
- [cgal-discuss] Inserting random spheres into Delaunay triangulations, Adam Getchell, 10/29/2014
- Re: [cgal-discuss] Inserting random spheres into Delaunay triangulations, Sebastien Loriot (GeometryFactory), 10/29/2014
- Re: [cgal-discuss] Inserting random spheres into Delaunay triangulations, Adam Getchell, 10/30/2014
- Re: [cgal-discuss] Inserting random spheres into Delaunay triangulations, Sebastien Loriot (GeometryFactory), 10/29/2014
Archive powered by MHonArc 2.6.18.