Structural Bioinformatics Library
Template C++ / Python API for developping structural bioinformatics applications.
|
Authors: F. Cazals and T. Dreyfus
This package provides constructions and predicates related to the CGAL Spherical_kernel_3 [33] . In particular, it allows to compute an orientation for the circular arcs. Given two spheres , that intersect on a circle , a point on this circle and a circular arc starting at oriented with a tangent vector at , we say that is counter-clockwise oriented w.r.t iff the following mixed product is positive: . More intuitively, this means that bounds on its "left".
While the computation of is straightforward, computing and require managing degree two algebraic operations. To understand why, assume that is counter-clockwise oriented:
Now, given a third sphere , assume that is the intersection point between , and , and consider the plane tangent to at . Note that cannot contain nor . Since is the source of , and have to point to different sides of . If it is not the case, this means that is not counter-clockwise oriented.
We use these properties for determining the orientation of a circular arc defining by three intersecting spheres , and , and a reference point allowing to locate the source of the circular arc:
The SBL::GT::T_Spherical_kernel_extension_3 < SphericalKernel3 > is designed as a traits class defining the functors corresponding to the different constructions and predicates. The template parameter is one of the CGAL three dimensional spherical kernel, that could be the exact one (CGAL::Exact_spherical_kernel_3) or the generic one (CGAL::Spherical_kernel_3). See the Example section.
This package has no internal dependency.
The only one external dependency is the CGAL library, for the representation of 3D geometric objects. Note that this part of the CGAL library is generic and consists only of C++ header files.
The following example presents the SBL::GT::T_Spherical_kernel_extension_3::Is_counter_clockwise_oriented predicate, with exact or inexact computations.