Subject: CGAL users discussion list
List archive
- From: Omer Ozturk <>
- To:
- Subject: [cgal-discuss] Scene_c2t3_item
- Date: Wed, 19 Nov 2014 11:04:46 -0800 (PST)
Hello everyone,
In polyhedron demo, I can't show Scene_c2t3_item in the scene. My code is;
typedef CGAL::Surface_mesh_default_triangulation_3 Tr;
typedef CGAL::Complex_2_in_triangulation_3
C2t3;
typedef Tr::Geom_traits GT;
typedef GT::Sphere_3 Sphere_3;
typedef GT::Point_3 Point_3;
typedef GT::FT FT;
typedef FT (*Function)(Point_3);
typedef CGAL::Implicit_surface_3<GT, Function> Surface_3;
FT sphere_function (Point_3 p) {
const FT x2=p.x()*p.x(), y2=p.y()*p.y(), z2=p.z()*p.z();
return x2+y2+z2-1;
}
void addSphere(){
Tr tr;
C2t3 c2t3 (tr);
Surface_3 surface(sphere_function, Sphere_3(CGAL::ORIGIN, 2.));
CGAL::Surface_mesh_default_criteria_3
criteria(30.,1.,1.);
CGAL::make_surface_mesh(c2t3, surface, criteria,
CGAL::Non_manifold_tag());
Scene_item* item = new Scene_c2t3_item(c2t3);
item->setVisible(true);
scene->addItem(item);
}
It works with no error but the item is not showing when I add it to scene.
Can you help me?
Thanks.
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Scene-c2t3-item-tp4660134.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] Scene_c2t3_item, Omer Ozturk, 11/19/2014
- Re: [cgal-discuss] Scene_c2t3_item, Sebastien Loriot (GeometryFactory), 11/20/2014
- Re: [cgal-discuss] Scene_c2t3_item, Laurent Rineau (CGAL/GeometryFactory), 11/20/2014
Archive powered by MHonArc 2.6.18.