mirror of https://github.com/CGAL/cgal
added link to the functor example in the manual
+ cosmetic changes in the examples
This commit is contained in:
parent
bc80c3a711
commit
5aeb11a03a
|
|
@ -69,11 +69,16 @@ In fact, the spherical kernel is documented as a concept,
|
||||||
\item {} and a predefined kernel \ccc{Exact_spherical_kernel_3}.
|
\item {} and a predefined kernel \ccc{Exact_spherical_kernel_3}.
|
||||||
\end{itemize}
|
\end{itemize}
|
||||||
|
|
||||||
\section{Example}
|
\section{Examples}
|
||||||
|
|
||||||
This example shows how to construct spheres and compute intersections on them.
|
The first example shows how to construct spheres and compute
|
||||||
|
intersections on them using the global function.
|
||||||
|
|
||||||
\ccIncludeExampleCode{Circular_kernel_3/spherical_kernel_3.cpp}
|
\ccIncludeExampleCode{Circular_kernel_3/intersecting_spheres.cpp}
|
||||||
|
|
||||||
|
The second example illustrates the use of a functor.
|
||||||
|
|
||||||
|
\ccIncludeExampleCode{Circular_kernel_3/functor_has_on.cpp}
|
||||||
|
|
||||||
\section{Design and Implementation History}
|
\section{Design and Implementation History}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,7 @@
|
||||||
#include <CGAL/MP_Float.h>
|
#include <CGAL/Exact_spherical_kernel_3.h>
|
||||||
#include <CGAL/Quotient.h>
|
|
||||||
|
|
||||||
#include <CGAL/Cartesian.h>
|
|
||||||
#include <CGAL/Algebraic_kernel_for_spheres_2_3.h>
|
|
||||||
|
|
||||||
#include <CGAL/Spherical_kernel_3.h>
|
|
||||||
|
|
||||||
#include <CGAL/Random.h>
|
#include <CGAL/Random.h>
|
||||||
|
|
||||||
typedef CGAL::Quotient<CGAL::MP_Float> NT;
|
typedef CGAL::Exact_spherical_kernel_3 Spherical_k;
|
||||||
typedef CGAL::Cartesian<NT> Linear_k;
|
|
||||||
typedef CGAL::Algebraic_kernel_for_spheres_2_3<NT> Algebraic_k;
|
|
||||||
typedef CGAL::Spherical_kernel_3<Linear_k, Algebraic_k> Spherical_k;
|
|
||||||
|
|
||||||
typedef CGAL::Point_3<Spherical_k> Point_3;
|
typedef CGAL::Point_3<Spherical_k> Point_3;
|
||||||
typedef CGAL::Circular_arc_3<Spherical_k> Circular_arc_3;
|
typedef CGAL::Circular_arc_3<Spherical_k> Circular_arc_3;
|
||||||
|
|
@ -31,10 +21,11 @@ int main()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
std::cout << "There are " << n << " points in the " <<
|
|
||||||
"[0,..,10]x[0,..,10]x[0,...,10] " <<
|
std::cout << "There are " << n << " points in the "
|
||||||
"grid on the circular" << std::endl <<
|
<< "[0,..,10]x[0,..,10]x[0,...,10] "
|
||||||
" arc defined by the points (10,10,0), (5,5,5), (0,0,0)" <<
|
<< "grid on the circular" << std::endl
|
||||||
std::endl << "See the points above." << std::endl;
|
<< " arc defined by the points (10,10,0), (5,5,5), (0,0,0)"
|
||||||
|
<< std::endl << "See the points above." << std::endl;
|
||||||
return 0;
|
return 0;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue