-
Hello, As written in the doc, the dual of a face of an Apollonius graph has type But how to do in general? That is, I'm looking for something like GT::Object_2 d = ag.dual(f);
if(typeof(d) == Site2) {
......
} else {
......
} I believe I have to use |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 5 replies
-
My attempts which do not work: Object2 obj = ag.dual(f);
Site2 site;
if(Traits::assign_2_object(site, obj)) {
Point2 pt = site.point();
DualPoints(fid, 0) = pt.x();
DualPoints(fid, 1) = pt.y();
} else {
// ...
} Site2 site;
if(Traits::assign_2_object(site, ag.dual(f))) {
Point2 pt = site.point();
DualPoints(fid, 0) = pt.x();
DualPoints(fid, 1) = pt.y();
} else {
// ...
} |
Beta Was this translation helpful? Give feedback.
-
This compiles so that probably works: Traits traits = ag.geom_traits();
Traits::Construct_object_2 cst = traits.construct_object_2_object();
Object2 obj = cst(ag.dual(f));
Traits::Assign_2 assgn = traits.assign_2_object();
Site2 site;
if(assgn(site, obj)) {
Point2 pt = site.point();
DualPoints(fid, 0) = pt.x();
DualPoints(fid, 1) = pt.y();
} else {
// ...
} |
Beta Was this translation helpful? Give feedback.
-
Something weird happens. I replaced |
Beta Was this translation helpful? Give feedback.
-
I checked https://github.com/CGAL/cgal/blob/master/Apollonius_graph_2/include/CGAL/Apollonius_graph_2.h. There's no method |
Beta Was this translation helpful? Give feedback.
This compiles so that probably works: