Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] how to output a point's coordinate

Subject: CGAL users discussion list

List archive

[cgal-discuss] how to output a point's coordinate


Chronological Thread 
  • From: "zengming" <>
  • To: "" <>
  • Subject: [cgal-discuss] how to output a point's coordinate
  • Date: Fri, 6 Mar 2009 16:01:57 +0800

hi, everyone. I am fresh at cgal. how can I print the coordinate of a point?
here is the test programe:
 
#include <CGAL/Exact_spherical_kernel_3.h>
 
typedef CGAL::Exact_spherical_kernel_3         Spherical_k;
 
typedef CGAL::Point_3<Spherical_k>             Point_3;
typedef CGAL::Sphere_3<Spherical_k>            Sphere_3;
 
int main() {
 
 Sphere_3 s1 = Sphere_3(Point_3(1.0,0.0,0.0), r);
 Sphere_3 s2 = Sphere_3(Point_3(-1.0,0.0,0.0), r);
 Sphere_3 s3 = Sphere_3(Point_3(0.0,0.0,1.0), r);
 
 std::vector< CGAL::Object > intersecs;
 CGAL::intersection(s1, s2, s3, std::back_inserter(intersecs));
 std::cout<<intersecs.size()<<std::endl;
 
 Point_3 pt3;
 assign(pt3, intersecs[0]); 
//how can I output the coordinate of point pt3?
 
 return 0;
}
 
2009-03-06

zengming



Archive powered by MHonArc 2.6.16.

Top of Page