mirror of https://github.com/CGAL/cgal
Merge remote-tracking branch 'cgal/master' into Demo-Use_metadata_for_runtime_loading-GF
This commit is contained in:
commit
160ec1575c
|
|
@ -2,12 +2,12 @@
|
|||
set -e
|
||||
[ -n "$CGAL_DEBUG_TRAVIS" ] && set -x
|
||||
|
||||
CXX_FLAGS="-DCGAL_NDEBUG"
|
||||
CXX_FLAGS="-DCGAL_NDEBUG -ftemplate-backtrace-limit=0"
|
||||
|
||||
function build_examples {
|
||||
mkdir -p build-travis
|
||||
cd build-travis
|
||||
cmake -DCGAL_DIR="/usr/local/lib/cmake/CGAL" -DCMAKE_CXX_FLAGS_RELEASE="${CXX_FLAGS}" ..
|
||||
cmake -DCGAL_DIR="/usr/local/lib/cmake/CGAL" -DCMAKE_CXX_FLAGS="${CXX_FLAGS}" ..
|
||||
make -j2
|
||||
}
|
||||
|
||||
|
|
@ -45,7 +45,7 @@ function build_demo {
|
|||
QGLVIEWERROOT=$PWD/qglviewer
|
||||
export QGLVIEWERROOT
|
||||
fi
|
||||
cmake -DCGAL_DIR="/usr/local/lib/cmake/CGAL" -DQt5_DIR="/opt/qt55/lib/cmake/Qt5" -DQt5Svg_DIR="/opt/qt55/lib/cmake/Qt5Svg" -DQt5OpenGL_DIR="/opt/qt55/lib/cmake/Qt5OpenGL" -DCGAL_DONT_OVERRIDE_CMAKE_FLAGS:BOOL=ON -DCMAKE_CXX_FLAGS_RELEASE="${CXX_FLAGS} ${EXTRA_CXX_FLAGS}" ..
|
||||
cmake -DCGAL_DIR="/usr/local/lib/cmake/CGAL" -DQt5_DIR="/opt/qt55/lib/cmake/Qt5" -DQt5Svg_DIR="/opt/qt55/lib/cmake/Qt5Svg" -DQt5OpenGL_DIR="/opt/qt55/lib/cmake/Qt5OpenGL" -DCGAL_DONT_OVERRIDE_CMAKE_FLAGS:BOOL=ON -DCMAKE_CXX_FLAGS="${CXX_FLAGS} ${EXTRA_CXX_FLAGS}" ..
|
||||
make -j2
|
||||
}
|
||||
old_IFS=$IFS
|
||||
|
|
|
|||
|
|
@ -0,0 +1,41 @@
|
|||
# Created by the script cgal_create_CMakeLists
|
||||
# This is the CMake script for compiling a set of CGAL applications.
|
||||
|
||||
project( AABB_traits_benchmark)
|
||||
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
cmake_policy(VERSION 3.1)
|
||||
|
||||
|
||||
if ( COMMAND cmake_policy )
|
||||
|
||||
cmake_policy( SET CMP0003 NEW )
|
||||
|
||||
endif()
|
||||
|
||||
# CGAL and its components
|
||||
find_package( CGAL QUIET)
|
||||
if ( CGAL_FOUND )
|
||||
include( ${CGAL_USE_FILE} )
|
||||
else ()
|
||||
message(STATUS "This project requires the CGAL library, and will not be compiled.")
|
||||
return()
|
||||
|
||||
endif()
|
||||
|
||||
|
||||
# Boost and its components
|
||||
find_package( Boost REQUIRED )
|
||||
# include for local directory
|
||||
if ( NOT Boost_FOUND )
|
||||
message(STATUS "This project requires the Boost library, and will not be compiled.")
|
||||
return()
|
||||
endif()
|
||||
|
||||
# include for local package
|
||||
include_directories( BEFORE ../../include )
|
||||
|
||||
add_executable (test_ test.cpp)
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,176 @@
|
|||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||
#include <CGAL/Surface_mesh.h>
|
||||
|
||||
#include <CGAL/Polygon_mesh_processing/intersection.h>
|
||||
#include <CGAL/Polygon_mesh_processing/transform.h>
|
||||
|
||||
#include <CGAL/boost/graph/copy_face_graph.h>
|
||||
#include <CGAL/AABB_tree.h>
|
||||
#include <CGAL/AABB_traits.h>
|
||||
#include <CGAL/Polygon_mesh_processing/internal/AABB_do_intersect_transform_traits.h>
|
||||
#include <CGAL/AABB_face_graph_triangle_primitive.h>
|
||||
#include <CGAL/Side_of_triangle_mesh.h>
|
||||
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
|
||||
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
|
||||
typedef CGAL::Surface_mesh<K::Point_3> Surface_mesh;
|
||||
|
||||
typedef CGAL::AABB_face_graph_triangle_primitive<Surface_mesh> Primitive;
|
||||
typedef CGAL::AABB_do_intersect_transform_traits<K, Primitive> Traits;
|
||||
typedef CGAL::AABB_tree<Traits> Tree;
|
||||
|
||||
namespace PMP = CGAL::Polygon_mesh_processing;
|
||||
|
||||
void naive_test(int k, const char* fname,
|
||||
int& nb_inter, int& nb_no_inter, int& nb_include)
|
||||
{
|
||||
std::ifstream input(fname);
|
||||
Surface_mesh tm, tm2;
|
||||
input >> tm;
|
||||
copy_face_graph(tm, tm2);
|
||||
CGAL::Aff_transformation_3<K> init1(CGAL::SCALING, 6.0);
|
||||
PMP::transform(init1, tm);
|
||||
CGAL::Bbox_3 box = PMP::bbox(tm);
|
||||
typedef CGAL::AABB_tree<CGAL::AABB_traits<K, Primitive> > Tree;
|
||||
Tree tmTree(tm.faces_begin(), tm.faces_end(), tm);
|
||||
Tree tmTree2(tm2.faces_begin(), tm2.faces_end(), tm2);
|
||||
CGAL::Aff_transformation_3<K> init2(CGAL::TRANSLATION, - K::Vector_3(
|
||||
(box.xmax()-box.xmin()),0,0));
|
||||
PMP::transform(init2, tm2);
|
||||
|
||||
tmTree.build();
|
||||
K::Vector_3 unit_vec = (2.0/k * K::Vector_3((box.xmax()-box.xmin()),
|
||||
0,
|
||||
0));
|
||||
CGAL::Aff_transformation_3<K> T0(CGAL::IDENTITY);
|
||||
K::FT rot[9];
|
||||
rot[0] = 1.0;
|
||||
rot[1] = 0.0;
|
||||
rot[2] = 0.0;
|
||||
rot[3] = 0.0;
|
||||
rot[4] = std::cos(CGAL_PI/4.0);
|
||||
rot[5] = -std::sin(CGAL_PI/4.0);
|
||||
rot[6] = 0.0;
|
||||
rot[7] = std::sin(CGAL_PI/4.0);
|
||||
rot[8] = std::cos(CGAL_PI/4.0);
|
||||
CGAL::Aff_transformation_3<K> R(rot[0], rot[1], rot[2],
|
||||
rot[3], rot[4], rot[5],
|
||||
rot[6], rot[7], rot[8]);
|
||||
|
||||
CGAL::Side_of_triangle_mesh<Surface_mesh, K> sotm1(tm);
|
||||
for(int i=1; i<k+1; ++i)
|
||||
{
|
||||
CGAL::Aff_transformation_3<K> T1 = CGAL::Aff_transformation_3<K>(CGAL::TRANSLATION, i*unit_vec);
|
||||
CGAL::Aff_transformation_3<K> transfo = T0*R*T1;
|
||||
PMP::transform(transfo, tm2);
|
||||
tmTree2.build();
|
||||
if(tmTree2.do_intersect(tmTree))
|
||||
++nb_inter;
|
||||
else
|
||||
{
|
||||
if(sotm1(tm2.point(*tm2.vertices().begin())) != CGAL::ON_UNBOUNDED_SIDE)
|
||||
{
|
||||
++nb_include;
|
||||
}
|
||||
else
|
||||
{
|
||||
CGAL::Side_of_triangle_mesh<Surface_mesh, K> sotm2(tm2);
|
||||
if(sotm2(tm.point(*tm.vertices().begin())) != CGAL::ON_UNBOUNDED_SIDE)
|
||||
++nb_include;
|
||||
else
|
||||
++nb_no_inter;
|
||||
}
|
||||
}
|
||||
T0 = CGAL::Aff_transformation_3<K>(CGAL::TRANSLATION, -i*unit_vec);
|
||||
}
|
||||
}
|
||||
void test_no_collision(int k, const char* fname,
|
||||
int& nb_inter, int& nb_no_inter, int& nb_include)
|
||||
{
|
||||
std::ifstream input(fname);
|
||||
Surface_mesh tm, tm2;
|
||||
input >> tm;
|
||||
copy_face_graph(tm, tm2);
|
||||
CGAL::Aff_transformation_3<K> init1(CGAL::SCALING, 6.0);
|
||||
PMP::transform(init1, tm);
|
||||
CGAL::Bbox_3 box = PMP::bbox(tm);
|
||||
Tree tmTree(tm.faces_begin(), tm.faces_end(), tm);
|
||||
Tree tmTree2(tm2.faces_begin(), tm2.faces_end(), tm2);
|
||||
CGAL::Aff_transformation_3<K> init2(CGAL::TRANSLATION, - K::Vector_3(
|
||||
(box.xmax()-box.xmin()),0,0));
|
||||
PMP::transform(init2, tm2);
|
||||
|
||||
tmTree.build();
|
||||
tmTree2.build();
|
||||
typedef boost::property_map<Surface_mesh, CGAL::vertex_point_t>::type VPM;
|
||||
VPM vpm2 = get(CGAL::vertex_point, tm2);
|
||||
|
||||
K::Vector_3 unit_vec = (2.0/k * K::Vector_3((box.xmax()-box.xmin()),
|
||||
0,
|
||||
0));
|
||||
|
||||
CGAL::Side_of_triangle_mesh<Surface_mesh, K,
|
||||
VPM, Tree> sotm1(tmTree);
|
||||
for(int i=1; i<k+1; ++i)
|
||||
{
|
||||
K::FT rot[9];
|
||||
rot[0] = 1.0;
|
||||
rot[1] = 0.0;
|
||||
rot[2] = 0.0;
|
||||
rot[3] = 0.0;
|
||||
rot[4] = std::cos(i*CGAL_PI/4.0);
|
||||
rot[5] = -std::sin(i*CGAL_PI/4.0);
|
||||
rot[6] = 0.0;
|
||||
rot[7] = std::sin(i*CGAL_PI/4.0);
|
||||
rot[8] = std::cos(i*CGAL_PI/4.0);
|
||||
CGAL::Aff_transformation_3<K> R(rot[0], rot[1], rot[2],
|
||||
rot[3], rot[4], rot[5],
|
||||
rot[6], rot[7], rot[8]);
|
||||
CGAL::Aff_transformation_3<K> T1 = CGAL::Aff_transformation_3<K>(CGAL::TRANSLATION, i*unit_vec);
|
||||
CGAL::Aff_transformation_3<K> transfo = R*T1;
|
||||
tmTree2.traits().set_transformation(transfo);
|
||||
CGAL::Interval_nt_advanced::Protector protector;
|
||||
if(tmTree2.do_intersect(tmTree))
|
||||
++nb_inter;
|
||||
else
|
||||
{
|
||||
if(sotm1(transfo.transform(vpm2[*tm2.vertices().begin()])) != CGAL::ON_UNBOUNDED_SIDE)
|
||||
{
|
||||
++nb_include;
|
||||
}
|
||||
else
|
||||
{
|
||||
CGAL::Side_of_triangle_mesh<Surface_mesh, K,
|
||||
VPM, Tree> sotm2(tmTree2);
|
||||
if(sotm2(tm.point(*tm.vertices().begin())) != CGAL::ON_UNBOUNDED_SIDE)
|
||||
++nb_include;
|
||||
else
|
||||
++nb_no_inter;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, const char** argv)
|
||||
{
|
||||
int k = (argc>1) ? atoi(argv[1]) : 10;
|
||||
const char* path = (argc>2)?argv[2]:"data/handle"
|
||||
".off";
|
||||
|
||||
std::cout<< k<<" steps in "<<path<<std::endl;
|
||||
int nb_inter(0), nb_no_inter(0), nb_include(0),
|
||||
naive_inter(0), naive_no_inter(0), naive_include(0);
|
||||
auto start = std::chrono::steady_clock::now();
|
||||
naive_test(k, path, naive_inter, naive_no_inter, naive_include);
|
||||
auto end = std::chrono::steady_clock::now();
|
||||
std::cout<<"Naive test :"<<naive_inter<<" collisions, "<<naive_include<<" inclusions, "<<naive_no_inter<<" no collision, calculated in "
|
||||
<<std::chrono::duration_cast<std::chrono::microseconds>(end - start).count() << "μs." << std::endl;
|
||||
start = std::chrono::steady_clock::now();
|
||||
test_no_collision(k, path,nb_inter, nb_no_inter, nb_include);
|
||||
end = std::chrono::steady_clock::now();
|
||||
std::cout<<"With transform_traits: "<<nb_inter<<" collisions, "<<nb_include<<" inclusions, "<<nb_no_inter<<" no collision, calculated in "
|
||||
<<std::chrono::duration_cast<std::chrono::microseconds>(end - start).count() << "μs." << std::endl;
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -17,7 +17,7 @@ if(POLICY CMP0071)
|
|||
endif()
|
||||
|
||||
# Include this package's headers first
|
||||
include_directories( BEFORE ./ ./include ../../include )
|
||||
include_directories( BEFORE ./ ./include )
|
||||
|
||||
# Find CGAL and CGAL Qt5
|
||||
find_package(CGAL COMPONENTS Qt5)
|
||||
|
|
@ -25,9 +25,6 @@ find_package(CGAL COMPONENTS Qt5)
|
|||
# Find Qt5 itself
|
||||
find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL Gui Svg)
|
||||
|
||||
include( ${CGAL_USE_FILE} )
|
||||
|
||||
|
||||
if(CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND)
|
||||
|
||||
qt5_wrap_ui( UI_FILES MainWindow.ui )
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAABB_treeConcepts
|
||||
\ingroup PkgAABBTreeConcepts
|
||||
\cgalConcept
|
||||
|
||||
The concept `AABBGeomTraits` defines the requirements for the first template parameter of the class `CGAL::AABB_traits<AABBGeomTraits, AABBPrimitive>`. It provides predicates and constructors to detect and compute intersections between query objects and the primitives stored in the AABB tree. In addition, it contains predicates and constructors to compute distances between a point query and the primitives stored in the AABB tree.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAABB_treeConcepts
|
||||
\ingroup PkgAABBTreeConcepts
|
||||
\cgalConcept
|
||||
|
||||
The concept `AABBPrimitive` describes the requirements for the primitives stored in the AABB tree data structure. The concept encapsulates a type for the input datum (a geometric object) and an identifier (id) type through which those primitives are referred to. The concept `AABBPrimitive` also refines the concepts DefaultConstructible and Assignable.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*!
|
||||
\ingroup PkgAABB_treeConcepts
|
||||
\ingroup PkgAABBTreeConcepts
|
||||
\cgalConcept
|
||||
|
||||
The concept `AABBPrimitiveWithSharedData` describes the requirements for the primitives
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*!
|
||||
\ingroup PkgAABB_treeConcepts
|
||||
\ingroup PkgAABBTreeConcepts
|
||||
\cgalConcept
|
||||
|
||||
The concept `AABBRayIntersectionGeomTraits` is a refinement of the
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*!
|
||||
\ingroup PkgAABB_treeConcepts
|
||||
\ingroup PkgAABBTreeConcepts
|
||||
\cgalConcept
|
||||
|
||||
The concept `AABBRayIntersectionTraits` is a refinement of the concept
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAABB_treeConcepts
|
||||
\ingroup PkgAABBTreeConcepts
|
||||
\cgalConcept
|
||||
|
||||
The concept `AABBTraits` provides the geometric primitive types and methods for the class `CGAL::AABB_tree<AABBTraits>`.
|
||||
|
|
@ -75,25 +75,17 @@ using Intersection_and_primitive_id = unspecified_type;
|
|||
|
||||
/// \name Splitting
|
||||
/// During the construction of the AABB tree, the primitives are
|
||||
/// sorted according to some comparison functions related to the \f$x\f$,
|
||||
/// \f$ y\f$ or \f$ z\f$ coordinate axis:
|
||||
/// splitted according to some comparison functions related to the longest axis:
|
||||
/// @{
|
||||
|
||||
/*!
|
||||
A functor object to split a range of primitives into two sub-ranges along the X-axis. Provides the operator:
|
||||
`void operator()(InputIterator first, InputIterator beyond);` %Iterator type `InputIterator` must be a model of RandomAccessIterator and have `Primitive` as value type. The operator is used for determining the primitives assigned to the two children nodes of a given node, assuming that the goal is to split the X-dimension of the bounding box of the node. The primitives assigned to this node are passed as argument to the operator. It should modify the iterator range in such a way that its first half and its second half correspond to the two children nodes.
|
||||
A functor object to split a range of primitives into two sub-ranges along the longest axis. Provides the operator:
|
||||
`void operator()(InputIterator first, InputIterator beyond);` %Iterator type `InputIterator` must be a model of RandomAccessIterator
|
||||
and have `Primitive` as value type. The operator is used for determining the primitives assigned to the two children nodes of a given node,
|
||||
assuming that the goal is to split the chosen axis dimension of the bounding box of the node. The primitives assigned to this node are passed as argument
|
||||
to the operator. It should modify the iterator range in such a way that its first half and its second half correspond to the two children nodes.
|
||||
*/
|
||||
typedef unspecified_type Split_primitives_along_x_axis;
|
||||
|
||||
/*!
|
||||
A functor object to split a range of primitives into two sub-ranges along the Y-axis. See `Split_primitives_along_x_axis` for the detailed description.
|
||||
*/
|
||||
typedef unspecified_type Split_primitives_along_y_axis;
|
||||
|
||||
/*!
|
||||
A functor object to split a range of primitives into two sub-ranges along the Z-axis. See `Split_primitives_along_x_axis` for the detailed description.
|
||||
*/
|
||||
typedef unspecified_type Split_primitives_along_z_axis;
|
||||
typedef unspecified_type Split_primitives;
|
||||
|
||||
/*!
|
||||
A functor object to compute the bounding box of a set of primitives. Provides the operator:
|
||||
|
|
@ -132,7 +124,7 @@ A functor object to compute the intersection of a query and a primitive. Provide
|
|||
\cgalHeading{Note on Backward Compatibility}
|
||||
Before the release 4.3 of \cgal, the return type of this function used to be `boost::optional<Object_and_primitive_id>`.
|
||||
*/
|
||||
typedef unspecified_type Intersect;
|
||||
typedef unspecified_type Intersection;
|
||||
|
||||
/// \name Distance Queries
|
||||
/// The following predicates are required for each
|
||||
|
|
@ -170,19 +162,9 @@ typedef unspecified_type Equal_3;
|
|||
/// @{
|
||||
|
||||
/*!
|
||||
Returns the primitive splitting functor for the X axis.
|
||||
Returns the primitive splitting functor.
|
||||
*/
|
||||
Split_primitives_along_x_axis split_primitives_along_x_axis_object();
|
||||
|
||||
/*!
|
||||
Returns the primitive splitting functor for the Y axis.
|
||||
*/
|
||||
Split_primitives_along_y_axis split_primitives_along_y_axis_object();
|
||||
|
||||
/*!
|
||||
Returns the primitive splitting functor for the Z axis.
|
||||
*/
|
||||
Split_primitives_along_z_axis split_primitives_along_z_axis_object();
|
||||
Split_primitives split_primitives_object();
|
||||
|
||||
/*!
|
||||
Returns the bounding box constructor.
|
||||
|
|
@ -197,7 +179,7 @@ Do_intersect do_intersect_object();
|
|||
/*!
|
||||
Returns the intersection constructor.
|
||||
*/
|
||||
Intersect intersect_object();
|
||||
Intersection intersection_object();
|
||||
|
||||
/*!
|
||||
Returns the distance comparison functor.
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
/// \defgroup PkgAABB_tree AABB Tree Reference
|
||||
/// \defgroup PkgAABBTreeRef AABB Tree Reference
|
||||
|
||||
/// \defgroup PkgAABB_treeConcepts Concepts
|
||||
/// \ingroup PkgAABB_tree
|
||||
/// \defgroup PkgAABBTreeConcepts Concepts
|
||||
/// \ingroup PkgAABBTreeRef
|
||||
|
||||
/*!
|
||||
\addtogroup PkgAABB_tree
|
||||
\cgalPkgDescriptionBegin{3D Fast Intersection and Distance Computation,PkgAABB_treeSummary}
|
||||
\addtogroup PkgAABBTreeRef
|
||||
\cgalPkgDescriptionBegin{3D Fast Intersection and Distance Computation,PkgAABBTree}
|
||||
\cgalPkgPicture{aabb-teaser-thumb.png}
|
||||
\cgalPkgSummaryBegin
|
||||
\cgalPkgAuthors{Pierre Alliez, Stéphane Tayeb, Camille Wormser}
|
||||
\cgalPkgDesc{The AABB (axis-aligned bounding box) tree component offers a static data structure and algorithms to perform efficient intersection and distance queries on sets of finite 3D geometric objects.}
|
||||
\cgalPkgManuals{Chapter_3D_Fast_Intersection_and_Distance_Computation,PkgAABB_tree}
|
||||
\cgalPkgManuals{Chapter_3D_Fast_Intersection_and_Distance_Computation,PkgAABBTreeRef}
|
||||
\cgalPkgSummaryEnd
|
||||
\cgalPkgShortInfoBegin
|
||||
\cgalPkgSince{3.5}
|
||||
|
|
|
|||
|
|
@ -4,18 +4,12 @@
|
|||
|
||||
project( AABB_tree_Examples )
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.10)
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
if ( CGAL_FOUND )
|
||||
|
||||
include( ${CGAL_USE_FILE} )
|
||||
|
||||
include( CGAL_CreateSingleSourceCGALProgram )
|
||||
|
||||
include_directories (BEFORE "../../include")
|
||||
|
||||
# create a target per cppfile
|
||||
file(GLOB cppfiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
|
||||
foreach(cppfile ${cppfiles})
|
||||
|
|
|
|||
|
|
@ -30,11 +30,12 @@
|
|||
#include <CGAL/AABB_primitive.h>
|
||||
#include <CGAL/boost/graph/property_maps.h>
|
||||
#include <CGAL/Default.h>
|
||||
#include <boost/mpl/if.hpp>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
/*!
|
||||
* \ingroup PkgAABB_tree
|
||||
* \ingroup PkgAABBTreeRef
|
||||
* Primitive type for a facet of a polyhedral surface.
|
||||
* It wraps a handle to a facet of a polyhedron to a 3D triangle.
|
||||
* The polyhedron from which the primitive is built should not be deleted
|
||||
|
|
@ -65,24 +66,27 @@ template < class FaceGraph,
|
|||
class CacheDatum=Tag_false >
|
||||
class AABB_face_graph_triangle_primitive
|
||||
#ifndef DOXYGEN_RUNNING
|
||||
: public AABB_primitive<typename boost::graph_traits<FaceGraph>::face_descriptor,
|
||||
: public AABB_primitive<typename boost::mpl::if_<OneFaceGraphPerTree,
|
||||
typename boost::graph_traits<FaceGraph>::face_descriptor,
|
||||
std::pair<typename boost::graph_traits<FaceGraph>::face_descriptor, const FaceGraph*> >::type,
|
||||
Triangle_from_face_descriptor_map<
|
||||
FaceGraph,
|
||||
typename Default::Get<VertexPointPMap,
|
||||
typename boost::property_map< FaceGraph,
|
||||
vertex_point_t>::type >::type>,
|
||||
vertex_point_t>::const_type >::type>,
|
||||
One_point_from_face_descriptor_map<
|
||||
FaceGraph,
|
||||
typename Default::Get<VertexPointPMap,
|
||||
typename boost::property_map< FaceGraph,
|
||||
vertex_point_t>::type >::type>,
|
||||
vertex_point_t>::const_type >::type>,
|
||||
OneFaceGraphPerTree,
|
||||
CacheDatum >
|
||||
#endif
|
||||
{
|
||||
typedef typename Default::Get<VertexPointPMap, typename boost::property_map< FaceGraph, vertex_point_t>::type >::type VertexPointPMap_;
|
||||
typedef typename Default::Get<VertexPointPMap, typename boost::property_map< FaceGraph, vertex_point_t>::const_type >::type VertexPointPMap_;
|
||||
typedef typename boost::graph_traits<FaceGraph>::face_descriptor FD;
|
||||
typedef typename boost::mpl::if_<OneFaceGraphPerTree, FD, std::pair<FD, const FaceGraph*> >::type Id_;
|
||||
|
||||
typedef typename boost::graph_traits<FaceGraph>::face_descriptor Id_;
|
||||
typedef Triangle_from_face_descriptor_map<FaceGraph,VertexPointPMap_> Triangle_property_map;
|
||||
typedef One_point_from_face_descriptor_map<FaceGraph,VertexPointPMap_> Point_property_map;
|
||||
|
||||
|
|
@ -92,6 +96,16 @@ class AABB_face_graph_triangle_primitive
|
|||
OneFaceGraphPerTree,
|
||||
CacheDatum > Base;
|
||||
|
||||
FD make_id(FD fd, const FaceGraph&, Tag_true)
|
||||
{
|
||||
return fd;
|
||||
}
|
||||
|
||||
std::pair<FD, const FaceGraph*> make_id(FD fd, const FaceGraph& fg, Tag_false)
|
||||
{
|
||||
return std::make_pair(fd, &fg);
|
||||
}
|
||||
|
||||
public:
|
||||
#ifdef DOXYGEN_RUNNING
|
||||
/// \name Types
|
||||
|
|
@ -105,9 +119,12 @@ public:
|
|||
*/
|
||||
typedef Kernel_traits<Point>::Kernel::Triangle_3 Datum;
|
||||
/*!
|
||||
Id type.
|
||||
Id type:
|
||||
- `boost::graph_traits<FaceGraph>::%face_descriptor` if `OneFaceGraphPerTree` is `CGAL::Tag_true`
|
||||
- `std::pair<boost::graph_traits<FaceGraph>::%face_descriptor, FaceGraph>` if `OneFaceGraphPerTree` is `CGAL::Tag_false`
|
||||
*/
|
||||
typedef boost::graph_traits<FaceGraph>::face_descriptor Id;
|
||||
unspecified_type Id;
|
||||
|
||||
/// @}
|
||||
|
||||
/*!
|
||||
|
|
@ -117,6 +134,7 @@ public:
|
|||
#else
|
||||
typedef typename Base::Id Id;
|
||||
#endif
|
||||
typedef typename boost::graph_traits<FaceGraph>::face_descriptor face_descriptor;
|
||||
|
||||
// constructors
|
||||
/*!
|
||||
|
|
@ -127,7 +145,7 @@ public:
|
|||
*/
|
||||
template <class Iterator>
|
||||
AABB_face_graph_triangle_primitive(Iterator it, const FaceGraph& graph, VertexPointPMap_ vppm)
|
||||
: Base( Id_(*it),
|
||||
: Base( Id_(make_id(*it, graph, OneFaceGraphPerTree())),
|
||||
Triangle_property_map(const_cast<FaceGraph*>(&graph),vppm),
|
||||
Point_property_map(const_cast<FaceGraph*>(&graph),vppm) )
|
||||
{}
|
||||
|
|
@ -137,8 +155,8 @@ public:
|
|||
If `VertexPointPMap` is the default of the class, an additional constructor
|
||||
is available with `vppm` set to `get(vertex_point, graph)`.
|
||||
*/
|
||||
AABB_face_graph_triangle_primitive(Id id, const FaceGraph& graph, VertexPointPMap_ vppm)
|
||||
: Base( Id_(id),
|
||||
AABB_face_graph_triangle_primitive(face_descriptor fd, const FaceGraph& graph, VertexPointPMap_ vppm)
|
||||
: Base( Id_(make_id(fd, graph, OneFaceGraphPerTree())),
|
||||
Triangle_property_map(const_cast<FaceGraph*>(&graph),vppm),
|
||||
Point_property_map(const_cast<FaceGraph*>(&graph),vppm) )
|
||||
{}
|
||||
|
|
@ -146,13 +164,13 @@ public:
|
|||
#ifndef DOXYGEN_RUNNING
|
||||
template <class Iterator>
|
||||
AABB_face_graph_triangle_primitive(Iterator it, const FaceGraph& graph)
|
||||
: Base( Id_(*it),
|
||||
: Base( Id_(make_id(*it, graph, OneFaceGraphPerTree())),
|
||||
Triangle_property_map(const_cast<FaceGraph*>(&graph)),
|
||||
Point_property_map(const_cast<FaceGraph*>(&graph)) )
|
||||
{}
|
||||
|
||||
AABB_face_graph_triangle_primitive(Id id, const FaceGraph& graph)
|
||||
: Base( Id_(id),
|
||||
AABB_face_graph_triangle_primitive(face_descriptor fd, const FaceGraph& graph)
|
||||
: Base( Id_(make_id(fd, graph, OneFaceGraphPerTree())),
|
||||
Triangle_property_map(const_cast<FaceGraph*>(&graph)),
|
||||
Point_property_map(const_cast<FaceGraph*>(&graph)) )
|
||||
{}
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@
|
|||
#include <CGAL/is_iterator.h>
|
||||
#include <boost/type_traits/is_convertible.hpp>
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
|
||||
#include <CGAL/Default.h>
|
||||
|
||||
|
|
@ -42,7 +43,7 @@ namespace CGAL {
|
|||
|
||||
|
||||
/*!
|
||||
* \ingroup PkgAABB_tree
|
||||
* \ingroup PkgAABBTreeRef
|
||||
* Primitive type for a edge of a polyhedral surface.
|
||||
* It wraps an `edge_descriptor` into a 3D segment.
|
||||
* The class model of `HalfedgeGraph` from which the primitive is built should not be deleted
|
||||
|
|
@ -78,7 +79,9 @@ template < class HalfedgeGraph,
|
|||
class CacheDatum = Tag_false >
|
||||
class AABB_halfedge_graph_segment_primitive
|
||||
#ifndef DOXYGEN_RUNNING
|
||||
: public AABB_primitive< typename boost::graph_traits<HalfedgeGraph>::edge_descriptor,
|
||||
: public AABB_primitive< typename boost::mpl::if_<OneHalfedgeGraphPerTree,
|
||||
typename boost::graph_traits<HalfedgeGraph>::edge_descriptor,
|
||||
std::pair<typename boost::graph_traits<HalfedgeGraph>::edge_descriptor, const HalfedgeGraph*> >::type,
|
||||
Segment_from_edge_descriptor_map<
|
||||
HalfedgeGraph,
|
||||
typename Default::Get<VertexPointPMap,
|
||||
|
|
@ -94,8 +97,9 @@ class AABB_halfedge_graph_segment_primitive
|
|||
#endif
|
||||
{
|
||||
typedef typename Default::Get<VertexPointPMap,typename boost::property_map< HalfedgeGraph,vertex_point_t>::type >::type VertexPointPMap_;
|
||||
typedef typename boost::graph_traits<HalfedgeGraph>::edge_descriptor ED;
|
||||
typedef typename boost::mpl::if_<OneHalfedgeGraphPerTree, ED, std::pair<ED, const HalfedgeGraph*> >::type Id_;
|
||||
|
||||
typedef typename boost::graph_traits<HalfedgeGraph>::edge_descriptor Id_;
|
||||
typedef Segment_from_edge_descriptor_map<HalfedgeGraph,VertexPointPMap_> Segment_property_map;
|
||||
typedef Source_point_from_edge_descriptor_map<HalfedgeGraph,VertexPointPMap_> Point_property_map;
|
||||
|
||||
|
|
@ -105,6 +109,16 @@ class AABB_halfedge_graph_segment_primitive
|
|||
OneHalfedgeGraphPerTree,
|
||||
CacheDatum > Base;
|
||||
|
||||
ED make_id(ED ed, const HalfedgeGraph&, Tag_true)
|
||||
{
|
||||
return ed;
|
||||
}
|
||||
|
||||
std::pair<ED, const HalfedgeGraph*> make_id(ED ed, const HalfedgeGraph& fg, Tag_false)
|
||||
{
|
||||
return std::make_pair(ed, &fg);
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
#ifdef DOXYGEN_RUNNING
|
||||
|
|
@ -119,18 +133,21 @@ public:
|
|||
*/
|
||||
typedef Kernel_traits<Point>::Kernel::Segment_3 Datum;
|
||||
/*!
|
||||
Id type.
|
||||
Id type:
|
||||
- `boost::graph_traits<HalfedgeGraph>::%edge_descriptor if `OneHalfedgeGraphPerTree` is `Tag_true`
|
||||
- `std::pair<boost::graph_traits<HalfedgeGraph>::edge_descriptor, HalfedgeGraph>` if `OneHalfedgeGraphPerTree` is `Tag_false`
|
||||
*/
|
||||
typedef boost::graph_traits<HalfedgeGraph>::edge_descriptor Id;
|
||||
unspecified_type Id;
|
||||
/// @}
|
||||
|
||||
/*!
|
||||
If `OneHalfedgeGraphPerTreeGraphPerTree` is CGAL::Tag_true, constructs a `Shared_data` object from a reference to the halfedge graph.
|
||||
If `OneHalfedgeGraphPerTree` is CGAL::Tag_true, constructs a `Shared_data` object from a reference to the halfedge graph.
|
||||
*/
|
||||
static unspecified_type construct_shared_data( HalfedgeGraph& graph );
|
||||
#else
|
||||
typedef typename Base::Id Id;
|
||||
#endif
|
||||
typedef typename boost::graph_traits<HalfedgeGraph>::edge_descriptor edge_descriptor;
|
||||
|
||||
/*!
|
||||
Constructs a primitive.
|
||||
|
|
@ -142,7 +159,7 @@ public:
|
|||
*/
|
||||
template <class Iterator>
|
||||
AABB_halfedge_graph_segment_primitive(Iterator it, const HalfedgeGraph& graph, VertexPointPMap_ vppm)
|
||||
: Base( Id_(*it),
|
||||
: Base( Id_(make_id(*it, graph, OneHalfedgeGraphPerTree())),
|
||||
Segment_property_map(const_cast<HalfedgeGraph*>(&graph), vppm),
|
||||
Point_property_map(const_cast<HalfedgeGraph*>(&graph), vppm) )
|
||||
{}
|
||||
|
|
@ -152,8 +169,8 @@ public:
|
|||
If `VertexPointPMap` is the default of the class, an additional constructor
|
||||
is available with `vppm` set to `boost::get(vertex_point, graph)`.
|
||||
*/
|
||||
AABB_halfedge_graph_segment_primitive(Id id, const HalfedgeGraph& graph, VertexPointPMap_ vppm)
|
||||
: Base( Id_(id),
|
||||
AABB_halfedge_graph_segment_primitive(edge_descriptor ed, const HalfedgeGraph& graph, VertexPointPMap_ vppm)
|
||||
: Base( Id_(make_id(ed, graph, OneHalfedgeGraphPerTree())),
|
||||
Segment_property_map(const_cast<HalfedgeGraph*>(&graph), vppm),
|
||||
Point_property_map(const_cast<HalfedgeGraph*>(&graph), vppm) )
|
||||
{}
|
||||
|
|
@ -161,12 +178,12 @@ public:
|
|||
#ifndef DOXYGEN_RUNNING
|
||||
template <class Iterator>
|
||||
AABB_halfedge_graph_segment_primitive(Iterator it, const HalfedgeGraph& graph)
|
||||
: Base( Id_(*it),
|
||||
: Base( Id_(make_id(*it, graph, OneHalfedgeGraphPerTree())),
|
||||
Segment_property_map(const_cast<HalfedgeGraph*>(&graph)),
|
||||
Point_property_map(const_cast<HalfedgeGraph*>(&graph)) ){}
|
||||
|
||||
AABB_halfedge_graph_segment_primitive(Id id, const HalfedgeGraph& graph)
|
||||
: Base( Id_(id),
|
||||
AABB_halfedge_graph_segment_primitive(edge_descriptor ed, const HalfedgeGraph& graph)
|
||||
: Base( Id_(make_id(ed, graph, OneHalfedgeGraphPerTree())),
|
||||
Segment_property_map(const_cast<HalfedgeGraph*>(&graph)),
|
||||
Point_property_map(const_cast<HalfedgeGraph*>(&graph)) ){}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
|
||||
namespace CGAL {
|
||||
|
||||
/// \addtogroup PkgAABB_tree
|
||||
/// \addtogroup PkgAABBTreeRef
|
||||
/// @{
|
||||
/// \deprecated This class is deprecated since \cgal 4.3, the class
|
||||
/// `AABB_halfedge_graph_segment_primitive` should be used instead.
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
namespace CGAL {
|
||||
/// \ingroup PkgAABB_tree
|
||||
/// \ingroup PkgAABBTreeRef
|
||||
/// \deprecated This class is deprecated since \cgal 4.3, the class
|
||||
/// `AABB_face_graph_triangle_primitive` should be used instead.
|
||||
///
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ public:
|
|||
|
||||
#ifdef DOXYGEN_RUNNING
|
||||
/*!
|
||||
* \ingroup PkgAABB_tree
|
||||
* \ingroup PkgAABBTreeRef
|
||||
* Generic primitive type.
|
||||
* The two property maps which are template parameters of the class enable to get the datum and the reference point of
|
||||
* the primitive from the identifier. The last template parameter controls whether the primitive class holds a copy of the datum.
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ namespace internal {
|
|||
|
||||
|
||||
/*!
|
||||
* \ingroup PkgAABB_tree
|
||||
* \ingroup PkgAABBTreeRef
|
||||
* Primitive type that uses as identifier an iterator with a 3D segment as `value_type`.
|
||||
* The iterator from which the primitive is built should not be invalided
|
||||
* while the AABB tree holding the primitive is in use.
|
||||
|
|
|
|||
|
|
@ -173,9 +173,13 @@ struct AABB_traits_base_2<GeomTraits,true>{
|
|||
|
||||
} } //end of namespace internal::AABB_tree
|
||||
|
||||
/// \addtogroup PkgAABB_tree
|
||||
/// \addtogroup PkgAABBTreeRef
|
||||
/// @{
|
||||
|
||||
// forward declaration
|
||||
template< typename AABBTraits>
|
||||
class AABB_tree;
|
||||
|
||||
/// This traits class handles any type of 3D geometric
|
||||
/// primitives provided that the proper intersection tests and
|
||||
/// constructions are implemented. It handles points, rays, lines and
|
||||
|
|
@ -289,14 +293,15 @@ public:
|
|||
* Sorts the range defined by [first,beyond[. Sort is achieved on bbox longuest
|
||||
* axis, using the comparison function `<dim>_less_than` (dim in {x,y,z})
|
||||
*/
|
||||
class Sort_primitives
|
||||
class Split_primitives
|
||||
{
|
||||
typedef AABB_traits<GeomTraits,AABBPrimitive,BboxMap> Traits;
|
||||
const Traits& m_traits;
|
||||
public:
|
||||
Sort_primitives(const AABB_traits<GeomTraits,AABBPrimitive,BboxMap>& traits)
|
||||
Split_primitives(const AABB_traits<GeomTraits,AABBPrimitive,BboxMap>& traits)
|
||||
: m_traits(traits) {}
|
||||
|
||||
typedef void result_type;
|
||||
template<typename PrimitiveIterator>
|
||||
void operator()(PrimitiveIterator first,
|
||||
PrimitiveIterator beyond,
|
||||
|
|
@ -320,7 +325,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
Sort_primitives sort_primitives_object() const {return Sort_primitives(*this);}
|
||||
Split_primitives split_primitives_object() const {return Split_primitives(*this);}
|
||||
|
||||
|
||||
/*
|
||||
|
|
@ -369,6 +374,19 @@ public:
|
|||
{
|
||||
return GeomTraits().do_intersect_3_object()(q, internal::Primitive_helper<AT>::get_datum(pr,m_traits));
|
||||
}
|
||||
|
||||
// intersection with AABB-tree
|
||||
template<typename AABBTraits>
|
||||
bool operator()(const CGAL::AABB_tree<AABBTraits>& other_tree, const Primitive& pr) const
|
||||
{
|
||||
return other_tree.do_intersect( internal::Primitive_helper<AT>::get_datum(pr,m_traits) );
|
||||
}
|
||||
|
||||
template<typename AABBTraits>
|
||||
bool operator()(const CGAL::AABB_tree<AABBTraits>& other_tree, const Bounding_box& bbox) const
|
||||
{
|
||||
return other_tree.do_intersect(bbox);
|
||||
}
|
||||
};
|
||||
|
||||
Do_intersect do_intersect_object() const {return Do_intersect(*this);}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@
|
|||
|
||||
namespace CGAL {
|
||||
|
||||
/// \addtogroup PkgAABB_tree
|
||||
/// \addtogroup PkgAABBTreeRef
|
||||
/// @{
|
||||
|
||||
/**
|
||||
|
|
@ -156,7 +156,29 @@ namespace CGAL {
|
|||
/// `build()` explicitly to ensure that the next call to
|
||||
/// query functions will not trigger the reconstruction of the
|
||||
/// data structure.
|
||||
/// A call to `AABBTraits::set_shared_data(t...)`
|
||||
/// is made using the internally stored traits.
|
||||
/// For compilers that do not support variadic templates,
|
||||
/// overloads up to 5 template arguments are provided.
|
||||
#if !defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) && !defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE)
|
||||
template<typename ... T>
|
||||
void build(T&& ...);
|
||||
#ifndef DOXYGEN_RUNNING
|
||||
void build();
|
||||
#endif
|
||||
#else
|
||||
void build();
|
||||
template<typename T1>
|
||||
void build(T1& t1);
|
||||
template<typename T1, typename T2>
|
||||
void build(T1& t1, T2& t2);
|
||||
template<typename T1, typename T2,typename T3>
|
||||
void build(T1& t1, T2& t2, T3& t3);
|
||||
template<typename T1, typename T2,typename T3,typename T4>
|
||||
void build(T1& t1, T2& t2, T3& t3, T4& t4);
|
||||
template<typename T1, typename T2,typename T3,typename T4,typename T5>
|
||||
void build(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5);
|
||||
#endif
|
||||
///@}
|
||||
|
||||
/// \name Operations
|
||||
|
|
@ -646,6 +668,18 @@ public:
|
|||
else
|
||||
return this->any_reference_point_and_id();
|
||||
}
|
||||
|
||||
//! Returns the datum (geometric object) represented `p`.
|
||||
#ifndef DOXYGEN_RUNNING
|
||||
typename internal::Primitive_helper<AABBTraits>::Datum_type
|
||||
#else
|
||||
typename AABBTraits::Primitive::Datum_reference
|
||||
#endif
|
||||
datum(Primitive& p)const
|
||||
{
|
||||
return internal::Primitive_helper<AABBTraits>::
|
||||
get_datum(p, this->traits());
|
||||
}
|
||||
|
||||
private:
|
||||
//Traits class
|
||||
|
|
@ -728,7 +762,7 @@ public:
|
|||
ConstPrimitiveIterator beyond,
|
||||
T&& ... t)
|
||||
{
|
||||
set_shared_data(std::forward<T>(t)...);
|
||||
set_shared_data(std::forward<T>(t)...);
|
||||
while(first != beyond)
|
||||
{
|
||||
m_primitives.push_back(Primitive(first,std::forward<T>(t)...));
|
||||
|
|
@ -752,6 +786,14 @@ public:
|
|||
|
||||
build();
|
||||
}
|
||||
|
||||
template<typename Tr>
|
||||
template<typename ... T>
|
||||
void AABB_tree<Tr>::build(T&& ... t)
|
||||
{
|
||||
set_shared_data(std::forward<T>(t)...);
|
||||
build();
|
||||
}
|
||||
#else
|
||||
//=============constructor======================
|
||||
template<typename Tr>
|
||||
|
|
@ -1033,7 +1075,43 @@ public:
|
|||
|
||||
build();
|
||||
}
|
||||
#endif
|
||||
//overloads calling set_shared_data()
|
||||
template<typename Tr>
|
||||
template<typename T1>
|
||||
void AABB_tree<Tr>::build(T1& t1)
|
||||
{
|
||||
set_shared_data(t1);
|
||||
build();
|
||||
}
|
||||
template<typename Tr>
|
||||
template<typename T1, typename T2>
|
||||
void AABB_tree<Tr>::build(T1& t1, T2& t2)
|
||||
{
|
||||
set_shared_data(t1, t2);
|
||||
build();
|
||||
}
|
||||
template<typename Tr>
|
||||
template<typename T1, typename T2, typename T3>
|
||||
void AABB_tree<Tr>::build(T1& t1, T2& t2, T3& t3)
|
||||
{
|
||||
set_shared_data(t1, t2, t3);
|
||||
build();
|
||||
}
|
||||
template<typename Tr>
|
||||
template<typename T1, typename T2, typename T3, typename T4>
|
||||
void AABB_tree<Tr>::build(T1& t1, T2& t2, T3& t3, T4& t4)
|
||||
{
|
||||
set_shared_data(t1, t2, t3, t4);
|
||||
build();
|
||||
}
|
||||
template<typename Tr>
|
||||
template<typename T1, typename T2, typename T3, typename T4, typename T5>
|
||||
void AABB_tree<Tr>::build(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5)
|
||||
{
|
||||
set_shared_data(t1, t2, t3, t4, t5);
|
||||
build();
|
||||
}
|
||||
#endif
|
||||
|
||||
template<typename Tr>
|
||||
void AABB_tree<Tr>::insert(const Primitive& p)
|
||||
|
|
@ -1062,7 +1140,7 @@ public:
|
|||
|
||||
// constructs the tree
|
||||
m_p_root_node->expand(m_primitives.begin(), m_primitives.end(),
|
||||
m_primitives.size(), m_traits);
|
||||
m_primitives.size(), m_traits);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ namespace internal {
|
|||
|
||||
|
||||
/*!
|
||||
* \ingroup PkgAABB_tree
|
||||
* \ingroup PkgAABBTreeRef
|
||||
* Primitive type that uses as identifier an iterator with a 3D triangle as `value_type`.
|
||||
* The iterator from which the primitive is built should not be invalided
|
||||
* while the AABB tree holding the primitive is in use.
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
namespace CGAL {
|
||||
// \ingroup PkgAABB_tree
|
||||
// \ingroup PkgAABBTreeRef
|
||||
// Primitive type that wraps a facet handle of a CGAL::Triangulation_3,
|
||||
// which is used as id, and allows the construction of the datum on
|
||||
// the fly. Since only the facet handle is stored in this primitive,
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ AABB_node<Tr>::expand(ConstPrimitiveIterator first,
|
|||
m_bbox = traits.compute_bbox_object()(first, beyond);
|
||||
|
||||
// sort primitives along longest axis aabb
|
||||
traits.sort_primitives_object()(first, beyond, m_bbox);
|
||||
traits.split_primitives_object()(first, beyond, m_bbox);
|
||||
|
||||
switch(range)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,17 +4,13 @@
|
|||
|
||||
project( AABB_tree_Tests )
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.10)
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
if ( CGAL_FOUND )
|
||||
|
||||
include( ${CGAL_USE_FILE} )
|
||||
|
||||
include( CGAL_CreateSingleSourceCGALProgram )
|
||||
|
||||
include_directories (BEFORE "../../include")
|
||||
include( ${CGAL_USE_FILE} ) # Kept to test the old behaviour.
|
||||
|
||||
# create a target per cppfile
|
||||
file(GLOB cppfiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,74 @@
|
|||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <CGAL/Timer.h>
|
||||
|
||||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||
|
||||
#include <CGAL/AABB_tree.h>
|
||||
#include <CGAL/AABB_traits.h>
|
||||
#include <CGAL/AABB_face_graph_triangle_primitive.h>
|
||||
#include <CGAL/Surface_mesh.h>
|
||||
|
||||
typedef CGAL::Epick K;
|
||||
typedef K::Point_3 Point;
|
||||
typedef K::Triangle_3 Triangle;
|
||||
typedef CGAL::Surface_mesh<Point> Mesh;
|
||||
typedef CGAL::AABB_face_graph_triangle_primitive<Mesh> Primitive;
|
||||
typedef CGAL::AABB_traits<K, Primitive> Traits;
|
||||
typedef CGAL::AABB_tree<Traits> Tree;
|
||||
|
||||
typedef CGAL::AABB_face_graph_triangle_primitive<Mesh,
|
||||
CGAL::Default, CGAL::Tag_true, CGAL::Tag_true> Primitive2;
|
||||
typedef CGAL::AABB_traits<K, Primitive2> Traits2;
|
||||
typedef CGAL::AABB_tree<Traits2> Tree2;
|
||||
|
||||
typedef CGAL::AABB_face_graph_triangle_primitive<Mesh,
|
||||
CGAL::Default, CGAL::Tag_false, CGAL::Tag_true> Primitive3;
|
||||
typedef CGAL::AABB_traits<K, Primitive3> Traits3;
|
||||
typedef CGAL::AABB_tree<Traits3> Tree3;
|
||||
|
||||
typedef CGAL::AABB_face_graph_triangle_primitive<Mesh,
|
||||
CGAL::Default, CGAL::Tag_false, CGAL::Tag_false> Primitive4;
|
||||
typedef CGAL::AABB_traits<K, Primitive4> Traits4;
|
||||
typedef CGAL::AABB_tree<Traits4> Tree4;
|
||||
|
||||
int main(void)
|
||||
{
|
||||
Mesh m;
|
||||
std::ifstream in("data/cube.off");
|
||||
if(in)
|
||||
in >> m;
|
||||
else{
|
||||
std::cout << "error reading bunny" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
Tree t1(faces(m).begin(), faces(m).end(), m);
|
||||
Tree2 t2(faces(m).begin(), faces(m).end(), m);
|
||||
Tree3 t3(faces(m).begin(), faces(m).end(), m);
|
||||
Tree4 t4(faces(m).begin(), faces(m).end(), m);
|
||||
|
||||
t1.build();
|
||||
t2.build();
|
||||
t3.build();
|
||||
t4.build();
|
||||
|
||||
Primitive p1(faces(m).begin(), m);
|
||||
Primitive2 p2(faces(m).begin(), m);
|
||||
Primitive3 p3(faces(m).begin(), m);
|
||||
Primitive4 p4(faces(m).begin(), m);
|
||||
Triangle tr1 = t1.datum(p1);
|
||||
Triangle tr2 = t2.datum(p2);
|
||||
Triangle tr3 = t3.datum(p3);
|
||||
Triangle tr4 = t4.datum(p4);
|
||||
if(tr1 != tr2
|
||||
|| tr1 != tr3
|
||||
|| tr1 != tr4
|
||||
|| tr2 != tr3
|
||||
|| tr2 != tr4
|
||||
|| tr3 != tr4)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
#include <fstream>
|
||||
#include <algorithm>
|
||||
#include <iterator>
|
||||
|
||||
#include <boost/functional/value_factory.hpp>
|
||||
#include <boost/array.hpp>
|
||||
|
||||
#include <CGAL/assertions.h>
|
||||
#include <CGAL/algorithm.h>
|
||||
#include <CGAL/point_generators_3.h>
|
||||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||
|
||||
#include <CGAL/AABB_tree.h>
|
||||
#include <CGAL/AABB_traits.h>
|
||||
#include <CGAL/Surface_mesh.h>
|
||||
#include <CGAL/AABB_face_graph_triangle_primitive.h>
|
||||
#include <CGAL/AABB_halfedge_graph_segment_primitive.h>
|
||||
#include <CGAL/Timer.h>
|
||||
|
||||
typedef CGAL::Epick K;
|
||||
typedef K::FT FT;
|
||||
typedef K::Point_3 Point;
|
||||
typedef K::Vector_3 Vector;
|
||||
typedef K::Segment_3 Segment;
|
||||
typedef K::Ray_3 Ray;
|
||||
typedef CGAL::Surface_mesh<CGAL::Point_3<CGAL::Epick> > Mesh;
|
||||
typedef CGAL::AABB_face_graph_triangle_primitive<Mesh,
|
||||
CGAL::Default,
|
||||
CGAL::Tag_false> T_Primitive;
|
||||
typedef CGAL::AABB_traits<K, T_Primitive> T_Traits;
|
||||
typedef CGAL::AABB_tree<T_Traits> T_Tree;
|
||||
typedef T_Tree::Primitive_id T_Primitive_id;
|
||||
|
||||
typedef CGAL::AABB_halfedge_graph_segment_primitive<Mesh,
|
||||
CGAL::Default,
|
||||
CGAL::Tag_false> E_Primitive;
|
||||
typedef CGAL::AABB_traits<K, E_Primitive> E_Traits;
|
||||
typedef CGAL::AABB_tree<E_Traits> E_Tree;
|
||||
typedef E_Tree::Primitive_id E_Primitive_id;
|
||||
|
||||
int main()
|
||||
{
|
||||
CGAL::Surface_mesh<CGAL::Point_3<CGAL::Epick> > m1, m2;
|
||||
std::ifstream in("data/cube.off");
|
||||
if(in)
|
||||
in >> m1;
|
||||
else{
|
||||
std::cout << "error reading cube" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
in.close();
|
||||
in.open("data/tetrahedron.off");
|
||||
if(in)
|
||||
in >> m2;
|
||||
else{
|
||||
std::cout << "error reading tetrahedron" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
in.close();
|
||||
T_Tree tree(faces(m1).first, faces(m1).second, m1);
|
||||
tree.insert(faces(m2).first, faces(m2).second, m2);
|
||||
tree.build();
|
||||
T_Tree::Bounding_box bbox = tree.bbox();
|
||||
Point bbox_center((bbox.xmin() + bbox.xmax()) / 2,
|
||||
(bbox.ymin() + bbox.ymax()) / 2,
|
||||
(bbox.zmin() + bbox.zmax()) / 2);
|
||||
std::vector< T_Primitive_id > intersections;
|
||||
Ray ray(bbox_center+Vector(3,-0.25,0),bbox_center+Vector(-3,+0.25,0));
|
||||
tree.all_intersected_primitives(ray,
|
||||
std::back_inserter(intersections));
|
||||
E_Tree e_tree(edges(m1).first, edges(m1).second, m1);
|
||||
e_tree.insert(edges(m2).first, edges(m2).second, m2);
|
||||
e_tree.build();
|
||||
std::vector< E_Primitive_id > e_intersections;
|
||||
Ray e_ray(Point(0,0,0),Point(0,1,1));
|
||||
e_tree.all_intersected_primitives(e_ray,
|
||||
std::back_inserter(e_intersections));
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
/// \defgroup PkgAdvancingFrontSurfaceReconstruction Advancing Front Surface Reconstruction Reference
|
||||
/// \defgroup PkgAdvancingFrontSurfaceReconstructionRef Advancing Front Surface Reconstruction Reference
|
||||
|
||||
/*!
|
||||
\addtogroup PkgAdvancingFrontSurfaceReconstruction
|
||||
\addtogroup PkgAdvancingFrontSurfaceReconstructionRef
|
||||
|
||||
\cgalPkgDescriptionBegin{Advancing Front Surface Reconstruction,PkgAdvancingFrontSurfaceReconstructionSummary}
|
||||
\cgalPkgDescriptionBegin{Advancing Front Surface Reconstruction,PkgAdvancingFrontSurfaceReconstruction}
|
||||
\cgalPkgPicture{afsr-detail.png}
|
||||
\cgalPkgSummaryBegin
|
||||
\cgalPkgAuthors{Tran Kai Frank Da, David Cohen-Steiner}
|
||||
|
|
@ -12,11 +12,11 @@ unorganized point set. Starting from a seed facet, a piecewise linear
|
|||
surface is grown by adding Delaunay triangles one by one. The most
|
||||
plausible triangles are added first, in a way that avoids the appearance
|
||||
of topological singularities. }
|
||||
\cgalPkgManuals{Chapter_Advancing_Front_Surface_Reconstruction,PkgAdvancingFrontSurfaceReconstruction}
|
||||
\cgalPkgManuals{Chapter_Advancing_Front_Surface_Reconstruction,PkgAdvancingFrontSurfaceReconstructionRef}
|
||||
\cgalPkgSummaryEnd
|
||||
\cgalPkgShortInfoBegin
|
||||
\cgalPkgSince{4.7}
|
||||
\cgalPkgDependsOn{\ref PkgTriangulation3Summary}
|
||||
\cgalPkgDependsOn{\ref PkgTriangulation3}
|
||||
\cgalPkgBib{cgal:dc-afsr}
|
||||
\cgalPkgLicense{\ref licensesGPL "GPL"}
|
||||
\cgalPkgShortInfoEnd
|
||||
|
|
|
|||
|
|
@ -4,22 +4,16 @@
|
|||
|
||||
project( Advancing_front_surface_reconstruction_Examples )
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.10)
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
if ( CGAL_FOUND )
|
||||
|
||||
include( ${CGAL_USE_FILE} )
|
||||
|
||||
include( CGAL_CreateSingleSourceCGALProgram )
|
||||
|
||||
if (MSVC AND ( CMAKE_SIZEOF_VOID_P EQUAL 4 ) )
|
||||
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4244")
|
||||
endif()
|
||||
|
||||
include_directories (BEFORE "../../include")
|
||||
|
||||
# create a target per cppfile
|
||||
file(GLOB cppfiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
|
||||
foreach(cppfile ${cppfiles})
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ namespace CGAL {
|
|||
|
||||
|
||||
/*!
|
||||
\ingroup PkgAdvancingFrontSurfaceReconstruction
|
||||
\ingroup PkgAdvancingFrontSurfaceReconstructionRef
|
||||
|
||||
The class `Advancing_front_surface_reconstruction` enables advanced users to provide the unstructured
|
||||
point cloud in a 3D Delaunay triangulation. The reconstruction algorithm then marks vertices and faces
|
||||
|
|
@ -389,10 +389,10 @@ namespace CGAL {
|
|||
|
||||
Intern_successors_type* new_border()
|
||||
{
|
||||
nbe_pool.push_back(Next_border_elt());
|
||||
nbe_pool.resize(nbe_pool.size()+1);
|
||||
|
||||
Next_border_elt* p1 = & nbe_pool.back();
|
||||
nbe_pool.push_back(Next_border_elt());
|
||||
nbe_pool.resize(nbe_pool.size()+1);
|
||||
Next_border_elt* p2 = & nbe_pool.back();
|
||||
|
||||
Intern_successors_type ist(p1,p2);
|
||||
|
|
@ -2480,7 +2480,7 @@ namespace CGAL {
|
|||
}
|
||||
|
||||
/*!
|
||||
\ingroup PkgAdvancingFrontSurfaceReconstruction
|
||||
\ingroup PkgAdvancingFrontSurfaceReconstructionRef
|
||||
|
||||
For a sequence of points computes a sequence of index triples
|
||||
describing the faces of the reconstructed surface.
|
||||
|
|
@ -2532,7 +2532,7 @@ namespace CGAL {
|
|||
}
|
||||
|
||||
/*!
|
||||
\ingroup PkgAdvancingFrontSurfaceReconstruction
|
||||
\ingroup PkgAdvancingFrontSurfaceReconstructionRef
|
||||
|
||||
For a sequence of points computes a sequence of index triples
|
||||
describing the faces of the reconstructed surface.
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
namespace CGAL {
|
||||
|
||||
/*!
|
||||
\ingroup PkgAdvancingFrontSurfaceReconstruction
|
||||
\ingroup PkgAdvancingFrontSurfaceReconstructionRef
|
||||
|
||||
The class `Advancing_front_surface_reconstruction_cell_base_3` is the default
|
||||
cell type for the class `Advancing_front_surface_reconstruction`.
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ namespace CGAL {
|
|||
template <class B, class C> class Advancing_front_surface_reconstruction;
|
||||
|
||||
/*!
|
||||
\ingroup PkgAdvancingFrontSurfaceReconstruction
|
||||
\ingroup PkgAdvancingFrontSurfaceReconstructionRef
|
||||
|
||||
The class `Advancing_front_surface_reconstruction_vertex_base_3` is the default
|
||||
vertex type for the class `Advancing_front_surface_reconstruction`.
|
||||
|
|
|
|||
|
|
@ -4,18 +4,12 @@
|
|||
|
||||
project( Advancing_front_surface_reconstruction_Tests )
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.10)
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
if ( CGAL_FOUND )
|
||||
|
||||
include( ${CGAL_USE_FILE} )
|
||||
|
||||
include( CGAL_CreateSingleSourceCGALProgram )
|
||||
|
||||
include_directories (BEFORE "../../include")
|
||||
|
||||
# create a target per cppfile
|
||||
file(GLOB cppfiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
|
||||
foreach(cppfile ${cppfiles})
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ compatibility all functionality is also
|
|||
accessible through global functions defined within namespace `CGAL`,
|
||||
e.g., \link sqrt `CGAL::sqrt(x)` \endlink. This is realized via function templates using
|
||||
the according functor of the traits class. For an overview see
|
||||
Section \ref PkgAlgebraicFoundations in the reference manual.
|
||||
Section \ref PkgAlgebraicFoundationsRef in the reference manual.
|
||||
|
||||
\subsection Algebraic_foundationsTagsinAlgebraicStructure Tags in Algebraic Structure Traits
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
namespace CGAL {
|
||||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicFoundations
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
An instance of `Algebraic_structure_traits` is a model of `AlgebraicStructureTraits`, where <span class="textsc">T</span> is the associated type.
|
||||
|
||||
|
|
@ -17,7 +17,7 @@ class Algebraic_structure_traits {
|
|||
namespace CGAL {
|
||||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicFoundations
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
Tag indicating that a type is a model of the
|
||||
`EuclideanRing` concept.
|
||||
|
|
@ -34,7 +34,7 @@ struct Euclidean_ring_tag : public Unique_factorization_domain_tag {
|
|||
}; /* end Euclidean_ring_tag */
|
||||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicFoundations
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
Tag indicating that a type is a model of the `Field` concept.
|
||||
|
||||
|
|
@ -50,7 +50,7 @@ struct Field_tag : public Integral_domain_tag {
|
|||
}; /* end Field_tag */
|
||||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicFoundations
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
Tag indicating that a type is a model of the `FieldWithKthRoot` concept.
|
||||
|
||||
|
|
@ -66,7 +66,7 @@ struct Field_with_kth_root_tag : public Field_with_sqrt_tag {
|
|||
}; /* end Field_with_kth_root_tag */
|
||||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicFoundations
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
Tag indicating that a type is a model of the `FieldWithRootOf` concept.
|
||||
|
||||
|
|
@ -82,7 +82,7 @@ struct Field_with_root_of_tag : public Field_with_kth_root_tag {
|
|||
}; /* end Field_with_root_of_tag */
|
||||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicFoundations
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
Tag indicating that a type is a model of the `FieldWithSqrt` concept.
|
||||
|
||||
|
|
@ -98,7 +98,7 @@ struct Field_with_sqrt_tag : public Field_tag {
|
|||
}; /* end Field_with_sqrt_tag */
|
||||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicFoundations
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
Tag indicating that a type is a model of the `IntegralDomain` concept.
|
||||
|
||||
|
|
@ -114,7 +114,7 @@ struct Integral_domain_tag : public Integral_domain_without_division_tag {
|
|||
}; /* end Integral_domain_tag */
|
||||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicFoundations
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
Tag indicating that a type is a model of the `IntegralDomainWithoutDivision` concept.
|
||||
|
||||
|
|
@ -129,7 +129,7 @@ struct Integral_domain_without_division_tag {
|
|||
}; /* end Integral_domain_without_division_tag */
|
||||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicFoundations
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
Tag indicating that a type is a model of the `UniqueFactorizationDomain` concept.
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
namespace CGAL {
|
||||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicFoundations
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
An instance of `Coercion_traits` reflects the type coercion of the types
|
||||
<span class="textsc">A</span> and <span class="textsc">B</span>, it is symmetric in the two template arguments.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
namespace CGAL {
|
||||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicFoundations
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
An instance of `Fraction_traits` is a model of `FractionTraits`,
|
||||
where `T` is the associated type.
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
namespace CGAL {
|
||||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicFoundations
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
An instance of `Real_embeddable_traits` is a model of `RealEmbeddableTraits`, where <span class="textsc">T</span> is the associated type.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
namespace CGAL {
|
||||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicFoundations
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
The template function `abs()` returns the absolute value of a number.
|
||||
|
||||
|
|
@ -19,7 +19,7 @@ template <class NT> NT abs(const NT& x);
|
|||
namespace CGAL {
|
||||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicFoundations
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
The template function `compare()` compares the first argument with respect to
|
||||
the second, i.e.\ it returns `CGAL::LARGER` if \f$ x\f$ is larger then \f$ y\f$.
|
||||
|
|
@ -43,7 +43,7 @@ result_type compare(const NT &x, const NT &y);
|
|||
namespace CGAL {
|
||||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicFoundations
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
The function `div()` computes the integral quotient of division
|
||||
with remainder.
|
||||
|
|
@ -74,7 +74,7 @@ div(const NT1& x, const NT2& y);
|
|||
namespace CGAL {
|
||||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicFoundations
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
computes the quotient \f$ q\f$ and remainder \f$ r\f$, such that \f$ x = q*y + r\f$
|
||||
and \f$ r\f$ minimal with respect to the Euclidean Norm of the
|
||||
|
|
@ -109,7 +109,7 @@ div_mod(const NT1& x, const NT2& y, result_type& q, result_type& r);
|
|||
namespace CGAL {
|
||||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicFoundations
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
The function `gcd()` computes the greatest common divisor of two values.
|
||||
|
||||
|
|
@ -136,7 +136,7 @@ gcd(const NT1& x, const NT2& y);
|
|||
namespace CGAL {
|
||||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicFoundations
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
The function `integral_division()` (a.k.a.\ exact division or division without remainder)
|
||||
maps ring elements \f$ (x,y)\f$ to ring element \f$ z\f$ such that \f$ x = yz\f$ if such a \f$ z\f$
|
||||
|
|
@ -167,7 +167,7 @@ integral_division(const NT1& x, const NT2& y);
|
|||
namespace CGAL {
|
||||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicFoundations
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
The function `inverse()` returns the inverse element with respect to multiplication.
|
||||
|
||||
|
|
@ -187,7 +187,7 @@ template <class NT> NT inverse(const NT& x);
|
|||
namespace CGAL {
|
||||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicFoundations
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
The template function `is_negative()` determines if a value is negative or not.
|
||||
The function is defined if the argument type
|
||||
|
|
@ -206,7 +206,7 @@ result_type is_negative(const NT& x);
|
|||
namespace CGAL {
|
||||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicFoundations
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
The function `is_one()` determines if a value is equal to 1 or not.
|
||||
|
||||
|
|
@ -226,7 +226,7 @@ template <class NT> result_type is_one(const NT& x);
|
|||
namespace CGAL {
|
||||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicFoundations
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
The template function `is_positive()` determines if a value is positive or not.
|
||||
The function is defined if the argument type
|
||||
|
|
@ -245,7 +245,7 @@ result_type is_positive(const NT& x);
|
|||
namespace CGAL {
|
||||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicFoundations
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
An ring element \f$ x\f$ is said to be a square iff there exists a ring element
|
||||
\f$ y\f$ such
|
||||
|
|
@ -264,7 +264,7 @@ The `result_type` is convertible to `bool`.
|
|||
template <class NT> result_type is_square(const NT& x);
|
||||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicFoundations
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
An ring element \f$ x\f$ is said to be a square iff there exists a ring element
|
||||
\f$ y\f$ such
|
||||
|
|
@ -287,7 +287,7 @@ template <class NT> result_type is_square(const NT& x, NT& y);
|
|||
namespace CGAL {
|
||||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicFoundations
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
The function `is_zero()` determines if a value is equal to 0 or not.
|
||||
|
||||
|
|
@ -309,7 +309,7 @@ template <class NT> result_type is_zero(const NT& x);
|
|||
namespace CGAL {
|
||||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicFoundations
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
The function `kth_root()` returns the k-th root of a value.
|
||||
|
||||
|
|
@ -327,7 +327,7 @@ template <class NT> NT kth_root(int k, const NT& x);
|
|||
namespace CGAL {
|
||||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicFoundations
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
The function `mod()` computes the remainder of division with remainder.
|
||||
|
||||
|
|
@ -357,7 +357,7 @@ mod(const NT1& x, const NT2& y);
|
|||
namespace CGAL {
|
||||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicFoundations
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
returns the k-th real root of the univariate polynomial, which is
|
||||
defined by the iterator range, where begin refers to the constant
|
||||
|
|
@ -383,7 +383,7 @@ root_of(int k, InputIterator begin, InputIterator end);
|
|||
namespace CGAL {
|
||||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicFoundations
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
The template function `sign()` returns the sign of its argument.
|
||||
|
||||
|
|
@ -403,7 +403,7 @@ template <class NT> result_type sign(const NT& x);
|
|||
namespace CGAL {
|
||||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicFoundations
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
The function `simplify()` may simplify a given object.
|
||||
|
||||
|
|
@ -421,7 +421,7 @@ template <class NT> void simplify(const NT& x);
|
|||
namespace CGAL {
|
||||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicFoundations
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
The function `sqrt()` returns the square root of a value.
|
||||
|
||||
|
|
@ -439,7 +439,7 @@ template <class NT> NT sqrt(const NT& x);
|
|||
namespace CGAL {
|
||||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicFoundations
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
The function `square()` returns the square of a number.
|
||||
|
||||
|
|
@ -457,7 +457,7 @@ template <class NT> NT square(const NT& x);
|
|||
namespace CGAL {
|
||||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicFoundations
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
The template function `to_double()` returns a double approximation of a number.
|
||||
Note that in general, the value returned is not guaranteed to be the same
|
||||
|
|
@ -482,7 +482,7 @@ template <class NT> double to_double(const NT& x);
|
|||
namespace CGAL {
|
||||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicFoundations
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
The template function `to_interval()` computes for a given real embeddable
|
||||
number \f$ x\f$ a double interval containing \f$ x\f$.
|
||||
|
|
@ -502,7 +502,7 @@ std::pair<double,double> to_interval(const NT& x);
|
|||
namespace CGAL {
|
||||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicFoundations
|
||||
\ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
The function `unit_part()` computes the unit part of a given ring
|
||||
element.
|
||||
|
|
|
|||
|
|
@ -1,18 +1,18 @@
|
|||
/// \defgroup PkgAlgebraicFoundations Algebraic Foundations Reference
|
||||
/// \defgroup PkgAlgebraicFoundationsRef Algebraic Foundations Reference
|
||||
|
||||
/// \defgroup PkgAlgebraicFoundationsAlgebraicStructuresConcepts Concepts
|
||||
/// \ingroup PkgAlgebraicFoundations
|
||||
/// \ingroup PkgAlgebraicFoundationsRef
|
||||
|
||||
/*!
|
||||
\addtogroup PkgAlgebraicFoundations
|
||||
\addtogroup PkgAlgebraicFoundationsRef
|
||||
\todo check generated documentation
|
||||
|
||||
\cgalPkgDescriptionBegin{Algebraic Foundations,PkgAlgebraicFoundationsSummary}
|
||||
\cgalPkgDescriptionBegin{Algebraic Foundations,PkgAlgebraicFoundations}
|
||||
\cgalPkgPicture{Algebraic_foundations2.png}
|
||||
\cgalPkgSummaryBegin
|
||||
\cgalPkgAuthor{Michael Hemmer}
|
||||
\cgalPkgDesc{This package defines what algebra means for \cgal, in terms of concepts, classes and functions. The main features are: (i) explicit concepts for interoperability of types (ii) separation between algebraic types (not necessarily embeddable into the reals), and number types (embeddable into the reals).}
|
||||
\cgalPkgManuals{Chapter_Algebraic_Foundations,PkgAlgebraicFoundations}
|
||||
\cgalPkgManuals{Chapter_Algebraic_Foundations,PkgAlgebraicFoundationsRef}
|
||||
\cgalPkgSummaryEnd
|
||||
\cgalPkgShortInfoBegin
|
||||
\cgalPkgSince{3.3}
|
||||
|
|
|
|||
|
|
@ -4,18 +4,12 @@
|
|||
|
||||
project( Algebraic_foundations_Examples )
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.10)
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
if ( CGAL_FOUND )
|
||||
|
||||
include( ${CGAL_USE_FILE} )
|
||||
|
||||
include( CGAL_CreateSingleSourceCGALProgram )
|
||||
|
||||
include_directories (BEFORE "../../include")
|
||||
|
||||
# create a target per cppfile
|
||||
file(GLOB cppfiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
|
||||
foreach(cppfile ${cppfiles})
|
||||
|
|
|
|||
|
|
@ -4,17 +4,13 @@
|
|||
|
||||
project( Algebraic_foundations_Tests )
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.10)
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET COMPONENTS Core)
|
||||
|
||||
if ( CGAL_FOUND )
|
||||
|
||||
include( ${CGAL_USE_FILE} )
|
||||
|
||||
include( CGAL_CreateSingleSourceCGALProgram )
|
||||
|
||||
include_directories (BEFORE "../../include")
|
||||
include(${CGAL_USE_FILE})
|
||||
|
||||
# create a target per cppfile
|
||||
file(GLOB cppfiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
namespace CGAL {
|
||||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicKerneldModels
|
||||
\ingroup PkgAlgebraicKernelDModels
|
||||
|
||||
The class represents an algebraic real root by a square free polynomial and an
|
||||
isolating interval that uniquely defines the root.
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
namespace CGAL {
|
||||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicKerneldModels
|
||||
\ingroup PkgAlgebraicKernelDModels
|
||||
|
||||
This class gathers necessary tools for solving and handling bivariate
|
||||
polynomial systems of general degree \f$ d\f$.
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
namespace CGAL {
|
||||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicKerneldModels
|
||||
\ingroup PkgAlgebraicKernelDModels
|
||||
|
||||
\anchor Algebraic_kernel_rs_gmpq_d_1
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
namespace CGAL {
|
||||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicKerneldModels
|
||||
\ingroup PkgAlgebraicKernelDModels
|
||||
|
||||
\anchor Algebraic_kernel_rs_gmpz_d_1
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicKerneldConceptsUni
|
||||
\ingroup PkgAlgebraicKernelDConceptsUni
|
||||
\cgalConcept
|
||||
|
||||
A model of `AlgebraicKernel_d_1::ApproximateAbsolute_1` is an `AdaptableBinaryFunction` that computes an
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicKerneldConceptsUni
|
||||
\ingroup PkgAlgebraicKernelDConceptsUni
|
||||
\cgalConcept
|
||||
|
||||
A model of `AlgebraicKernel_d_1::ApproximateRelative_1` is an `AdaptableBinaryFunction` that computes an
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicKerneldConceptsUni
|
||||
\ingroup PkgAlgebraicKernelDConceptsUni
|
||||
\cgalConcept
|
||||
|
||||
Computes a number of type
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicKerneldConceptsUni
|
||||
\ingroup PkgAlgebraicKernelDConceptsUni
|
||||
\cgalConcept
|
||||
|
||||
Compares `AlgebraicKernel_d_1::Algebraic_real_1` values.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicKerneldConceptsUni
|
||||
\ingroup PkgAlgebraicKernelDConceptsUni
|
||||
\cgalConcept
|
||||
|
||||
Computes a square free univariate polynomial \f$ p\f$, such that the given
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicKerneldConceptsUni
|
||||
\ingroup PkgAlgebraicKernelDConceptsUni
|
||||
\cgalConcept
|
||||
|
||||
Constructs `AlgebraicKernel_d_1::Algebraic_real_1`.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicKerneldConceptsUni
|
||||
\ingroup PkgAlgebraicKernelDConceptsUni
|
||||
\cgalConcept
|
||||
|
||||
Determines whether a given pair of univariate polynomials \f$ p_1, p_2\f$ is coprime,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicKerneldConceptsUni
|
||||
\ingroup PkgAlgebraicKernelDConceptsUni
|
||||
\cgalConcept
|
||||
|
||||
Computes whether the given univariate polynomial is square free.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicKerneldConceptsUni
|
||||
\ingroup PkgAlgebraicKernelDConceptsUni
|
||||
\cgalConcept
|
||||
|
||||
Computes whether an `AlgebraicKernel_d_1::Polynomial_1`
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicKerneldConceptsUni
|
||||
\ingroup PkgAlgebraicKernelDConceptsUni
|
||||
\cgalConcept
|
||||
|
||||
Computes an open isolating interval for an `AlgebraicKernel_d_1::Algebraic_real_1`
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicKerneldConceptsUni
|
||||
\ingroup PkgAlgebraicKernelDConceptsUni
|
||||
\cgalConcept
|
||||
|
||||
Computes for a given pair of univariate polynomials \f$ p_1\f$, \f$ p_2\f$ their
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicKerneldConceptsUni
|
||||
\ingroup PkgAlgebraicKernelDConceptsUni
|
||||
\cgalConcept
|
||||
|
||||
Returns a square free part of a univariate polynomial.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicKerneldConceptsUni
|
||||
\ingroup PkgAlgebraicKernelDConceptsUni
|
||||
\cgalConcept
|
||||
|
||||
Computes the number of real solutions of the given univariate polynomial.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicKerneldConceptsUni
|
||||
\ingroup PkgAlgebraicKernelDConceptsUni
|
||||
\cgalConcept
|
||||
|
||||
Computes the sign of a univariate polynomial
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicKerneldConceptsUni
|
||||
\ingroup PkgAlgebraicKernelDConceptsUni
|
||||
\cgalConcept
|
||||
|
||||
Computes the real roots of a univariate polynomial.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicKerneldConceptsUni
|
||||
\ingroup PkgAlgebraicKernelDConceptsUni
|
||||
\cgalConcept
|
||||
|
||||
Computes a square free factorization of an
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicKerneldConceptsUni
|
||||
\ingroup PkgAlgebraicKernelDConceptsUni
|
||||
\cgalConcept
|
||||
|
||||
A model of the `AlgebraicKernel_d_1` concept is meant to provide the
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicKerneldConceptsBi
|
||||
\ingroup PkgAlgebraicKernelDConceptsBi
|
||||
\cgalConcept
|
||||
|
||||
A model of `AlgebraicKernel_d_2::ApproximateAbsoluteX_2` is an `AdaptableBinaryFunction` that computes an
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicKerneldConceptsBi
|
||||
\ingroup PkgAlgebraicKernelDConceptsBi
|
||||
\cgalConcept
|
||||
|
||||
A model of `AlgebraicKernel_d_2::ApproximateAbsoluteY_2` is an `AdaptableBinaryFunction` that computes an
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicKerneldConceptsBi
|
||||
\ingroup PkgAlgebraicKernelDConceptsBi
|
||||
\cgalConcept
|
||||
|
||||
A model of `AlgebraicKernel_d_2::ApproximateRelativeX_2` is an `AdaptableBinaryFunction` that computes an
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicKerneldConceptsBi
|
||||
\ingroup PkgAlgebraicKernelDConceptsBi
|
||||
\cgalConcept
|
||||
|
||||
A model of `AlgebraicKernel_d_2::ApproximateRelativeY_2` is an `AdaptableBinaryFunction` that computes an
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicKerneldConceptsBi
|
||||
\ingroup PkgAlgebraicKernelDConceptsBi
|
||||
\cgalConcept
|
||||
|
||||
Computes a number of type
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicKerneldConceptsBi
|
||||
\ingroup PkgAlgebraicKernelDConceptsBi
|
||||
\cgalConcept
|
||||
|
||||
Computes a number of type
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicKerneldConceptsBi
|
||||
\ingroup PkgAlgebraicKernelDConceptsBi
|
||||
\cgalConcept
|
||||
|
||||
Compares `AlgebraicKernel_d_2::Algebraic_real_2`s lexicographically.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicKerneldConceptsBi
|
||||
\ingroup PkgAlgebraicKernelDConceptsBi
|
||||
\cgalConcept
|
||||
|
||||
Compares the first coordinates of `AlgebraicKernel_d_2::Algebraic_real_2`s.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicKerneldConceptsBi
|
||||
\ingroup PkgAlgebraicKernelDConceptsBi
|
||||
\cgalConcept
|
||||
|
||||
Compares the second coordinated of `AlgebraicKernel_d_2::Algebraic_real_2`s.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicKerneldConceptsBi
|
||||
\ingroup PkgAlgebraicKernelDConceptsBi
|
||||
\cgalConcept
|
||||
|
||||
Computes a univariate square free polynomial \f$ p\f$, such that the first coordinate of
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicKerneldConceptsBi
|
||||
\ingroup PkgAlgebraicKernelDConceptsBi
|
||||
\cgalConcept
|
||||
|
||||
Computes a univariate square free polynomial \f$ p\f$, such that the second coordinate of
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicKerneldConceptsBi
|
||||
\ingroup PkgAlgebraicKernelDConceptsBi
|
||||
\cgalConcept
|
||||
|
||||
Computes the first coordinate of an
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicKerneldConceptsBi
|
||||
\ingroup PkgAlgebraicKernelDConceptsBi
|
||||
\cgalConcept
|
||||
|
||||
Computes the second coordinate of an
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicKerneldConceptsBi
|
||||
\ingroup PkgAlgebraicKernelDConceptsBi
|
||||
\cgalConcept
|
||||
|
||||
Constructs an `AlgebraicKernel_d_2::Algebraic_real_2`.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicKerneldConceptsBi
|
||||
\ingroup PkgAlgebraicKernelDConceptsBi
|
||||
\cgalConcept
|
||||
|
||||
Computes whether a given pair of bivariate polynomials is coprime.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicKerneldConceptsBi
|
||||
\ingroup PkgAlgebraicKernelDConceptsBi
|
||||
\cgalConcept
|
||||
|
||||
Computes whether the given bivariate polynomial is square free.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicKerneldConceptsBi
|
||||
\ingroup PkgAlgebraicKernelDConceptsBi
|
||||
\cgalConcept
|
||||
|
||||
Computes whether an `AlgebraicKernel_d_2::Polynomial_2`
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicKerneldConceptsBi
|
||||
\ingroup PkgAlgebraicKernelDConceptsBi
|
||||
\cgalConcept
|
||||
|
||||
Computes an isolating interval for the first coordinate of an `AlgebraicKernel_d_2::Algebraic_real_2`
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicKerneldConceptsBi
|
||||
\ingroup PkgAlgebraicKernelDConceptsBi
|
||||
\cgalConcept
|
||||
|
||||
Computes an isolating interval for the second coordinate of an `AlgebraicKernel_d_2::Algebraic_real_2`
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicKerneldConceptsBi
|
||||
\ingroup PkgAlgebraicKernelDConceptsBi
|
||||
\cgalConcept
|
||||
|
||||
Computes an isolating box for a given `AlgebraicKernel_d_2::Algebraic_real_2`.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicKerneldConceptsBi
|
||||
\ingroup PkgAlgebraicKernelDConceptsBi
|
||||
\cgalConcept
|
||||
|
||||
Computes for a given pair of bivariate polynomials \f$ p_1\f$, \f$ p_2\f$ their
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicKerneldConceptsBi
|
||||
\ingroup PkgAlgebraicKernelDConceptsBi
|
||||
\cgalConcept
|
||||
|
||||
Returns a square free part of a bivariate polynomial.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicKerneldConceptsBi
|
||||
\ingroup PkgAlgebraicKernelDConceptsBi
|
||||
\cgalConcept
|
||||
|
||||
Computes the number of real solutions of the given bivariate polynomial system.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicKerneldConceptsBi
|
||||
\ingroup PkgAlgebraicKernelDConceptsBi
|
||||
\cgalConcept
|
||||
|
||||
Computes the sign of a bivariate polynomial
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicKerneldConceptsBi
|
||||
\ingroup PkgAlgebraicKernelDConceptsBi
|
||||
\cgalConcept
|
||||
|
||||
Computes the real zero-dimensional solutions of a bivariate polynomial system.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicKerneldConceptsBi
|
||||
\ingroup PkgAlgebraicKernelDConceptsBi
|
||||
\cgalConcept
|
||||
|
||||
Computes a square free factorization of an
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAlgebraicKerneldConceptsBi
|
||||
\ingroup PkgAlgebraicKernelDConceptsBi
|
||||
\cgalConcept
|
||||
|
||||
A model of the `AlgebraicKernel_d_2` concept gathers necessary tools
|
||||
|
|
|
|||
|
|
@ -1,28 +1,28 @@
|
|||
/// \defgroup PkgAlgebraicKerneld Algebraic Kernel Reference
|
||||
/// \defgroup PkgAlgebraicKernelDRef Algebraic Kernel Reference
|
||||
|
||||
/// \defgroup PkgAlgebraicKerneldConcepts Concepts
|
||||
/// \ingroup PkgAlgebraicKerneld
|
||||
/// \defgroup PkgAlgebraicKernelDConcepts Concepts
|
||||
/// \ingroup PkgAlgebraicKernelDRef
|
||||
|
||||
/// \defgroup PkgAlgebraicKerneldConceptsUni Univariate Algebraic Kernel
|
||||
/// \ingroup PkgAlgebraicKerneldConcepts
|
||||
/// \defgroup PkgAlgebraicKernelDConceptsUni Univariate Algebraic Kernel
|
||||
/// \ingroup PkgAlgebraicKernelDConcepts
|
||||
|
||||
/// \defgroup PkgAlgebraicKerneldConceptsBi Bivariate Algebraic Kernel
|
||||
/// \ingroup PkgAlgebraicKerneldConcepts
|
||||
/// \defgroup PkgAlgebraicKernelDConceptsBi Bivariate Algebraic Kernel
|
||||
/// \ingroup PkgAlgebraicKernelDConcepts
|
||||
|
||||
|
||||
/// \defgroup PkgAlgebraicKerneldModels Models
|
||||
/// \ingroup PkgAlgebraicKerneld
|
||||
/// \defgroup PkgAlgebraicKernelDModels Models
|
||||
/// \ingroup PkgAlgebraicKernelDRef
|
||||
|
||||
|
||||
/*!
|
||||
\addtogroup PkgAlgebraicKerneld
|
||||
\addtogroup PkgAlgebraicKernelDRef
|
||||
\todo check generated documentation
|
||||
\cgalPkgDescriptionBegin{Algebraic Kernel,PkgAlgebraicKerneldSummary}
|
||||
\cgalPkgDescriptionBegin{Algebraic Kernel,PkgAlgebraicKernelD}
|
||||
\cgalPkgPicture{Algebraic_kernel_d.png}
|
||||
\cgalPkgSummaryBegin
|
||||
\cgalPkgAuthors{Eric Berberich, Michael Hemmer, Michael Kerber, Sylvain Lazard, Luis Peñaranda, and Monique Teillaud}
|
||||
\cgalPkgDesc{Real solving of polynomials is a fundamental problem with a wide application range. This package is targeted to provide black-box implementations of state-of-the-art algorithms to determine, compare and approximate real roots of univariate polynomials and bivariate polynomial systems. Such a black-box is called an *Algebraic %Kernel*. So far the package only provides models for the univariate kernel. Nevertheless, it already defines concepts for the bivariate kernel, since this settles the interface for upcoming implementations.}
|
||||
\cgalPkgManuals{Chapter_Algebraic_Kernel,PkgAlgebraicKerneld}
|
||||
\cgalPkgManuals{Chapter_Algebraic_Kernel,PkgAlgebraicKernelDRef}
|
||||
\cgalPkgSummaryEnd
|
||||
\cgalPkgShortInfoBegin
|
||||
\cgalPkgSince{3.6}
|
||||
|
|
|
|||
|
|
@ -6,14 +6,13 @@ cmake_minimum_required(VERSION 3.1)
|
|||
find_package(CGAL QUIET COMPONENTS Core)
|
||||
|
||||
if ( CGAL_FOUND )
|
||||
include( ${CGAL_USE_FILE} )
|
||||
find_package(MPFI QUIET)
|
||||
endif()
|
||||
|
||||
if( CGAL_FOUND AND MPFI_FOUND)
|
||||
|
||||
include( ${CGAL_USE_FILE} )
|
||||
include( ${MPFI_USE_FILE} )
|
||||
include( CGAL_CreateSingleSourceCGALProgram )
|
||||
include( CGAL_VersionUtils )
|
||||
|
||||
create_single_source_cgal_program( "Compare_1.cpp" )
|
||||
|
|
|
|||
|
|
@ -13,9 +13,6 @@ if ( NOT CGAL_FOUND )
|
|||
|
||||
endif()
|
||||
|
||||
# include helper file
|
||||
include( ${CGAL_USE_FILE} )
|
||||
|
||||
find_package(RS3 QUIET)
|
||||
|
||||
if(MPFI_FOUND)
|
||||
|
|
@ -25,8 +22,6 @@ if(RS3_FOUND)
|
|||
include( ${RS3_USE_FILE} )
|
||||
endif()
|
||||
|
||||
include( CGAL_CreateSingleSourceCGALProgram )
|
||||
|
||||
# Boost and its components
|
||||
find_package( Boost )
|
||||
|
||||
|
|
@ -41,14 +36,11 @@ endif()
|
|||
# include for local directory
|
||||
include_directories( BEFORE include )
|
||||
|
||||
# include for local package
|
||||
include_directories( BEFORE ../../include )
|
||||
include( ${CGAL_USE_FILE} )
|
||||
|
||||
# Creating entries for all .cpp/.C files with "main" routine
|
||||
# ##########################################################
|
||||
|
||||
include( CGAL_CreateSingleSourceCGALProgram )
|
||||
|
||||
create_single_source_cgal_program( "cyclic.cpp" )
|
||||
create_single_source_cgal_program( "Algebraic_curve_kernel_2.cpp" )
|
||||
create_single_source_cgal_program( "algebraic_curve_kernel_2_tools.cpp" )
|
||||
|
|
|
|||
|
|
@ -4,19 +4,13 @@
|
|||
|
||||
project( Algebraic_kernel_for_circles_Tests )
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.10)
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
if ( CGAL_FOUND )
|
||||
|
||||
include( ${CGAL_USE_FILE} )
|
||||
|
||||
include( CGAL_CreateSingleSourceCGALProgram )
|
||||
|
||||
include_directories (BEFORE "../../include")
|
||||
|
||||
include_directories (BEFORE "include")
|
||||
include_directories (BEFORE "include")
|
||||
|
||||
# create a target per cppfile
|
||||
file(GLOB cppfiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
|
||||
|
|
|
|||
|
|
@ -4,19 +4,13 @@
|
|||
|
||||
project( Algebraic_kernel_for_spheres_Tests )
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.10)
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
find_package(CGAL QUIET)
|
||||
|
||||
if ( CGAL_FOUND )
|
||||
|
||||
include( ${CGAL_USE_FILE} )
|
||||
|
||||
include( CGAL_CreateSingleSourceCGALProgram )
|
||||
|
||||
include_directories (BEFORE "../../include")
|
||||
|
||||
include_directories (BEFORE "include")
|
||||
include_directories (BEFORE "include")
|
||||
|
||||
# create a target per cppfile
|
||||
file(GLOB cppfiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
namespace CGAL {
|
||||
|
||||
/*!
|
||||
\ingroup PkgAlphaShape2
|
||||
\ingroup PkgAlphaShapes2Ref
|
||||
|
||||
The class `Alpha_shape_2` represents the family of
|
||||
\f$ \alpha\f$-shapes of points in a plane for <I>all</I> positive
|
||||
|
|
@ -108,6 +108,10 @@ resorting to exact arithmetic). Access to the interval containing the exact valu
|
|||
with `Protected=true`. Access to the exact value is provided through the function
|
||||
`FT::Exact_nt exact() const` where `FT::Exact_nt` depends on the configuration of %CGAL
|
||||
(it is `Gmpq` if `gmp` is available and `Quotient<CGAL::MP_Float>` otherwise).
|
||||
An overload for the function `double to_double(FT)` is also available. Its
|
||||
precision is controlled through `FT::set_relative_precision_of_to_double()` in
|
||||
exactly the same way as with `Lazy_exact_nt<NT>`, so a call to `to_double` may
|
||||
trigger an exact evaluation.
|
||||
It must be noted that an object of type `FT` is valid as long as the alpha shapes class that creates
|
||||
it is valid and has not been modified.
|
||||
For convenience, classical comparison operators are provided for the type `FT`.
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
namespace CGAL {
|
||||
|
||||
/*!
|
||||
\ingroup PkgAlphaShape2
|
||||
\ingroup PkgAlphaShapes2Ref
|
||||
|
||||
The class `Alpha_shape_face_base_2` is the default model for the concept `AlphaShapeFace_2`.
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
namespace CGAL {
|
||||
|
||||
/*!
|
||||
\ingroup PkgAlphaShape2
|
||||
\ingroup PkgAlphaShapes2Ref
|
||||
|
||||
The class `Alpha_shape_vertex_base_2` is the default model for the concept
|
||||
`AlphaShapeVertex_2`.
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
namespace CGAL {
|
||||
|
||||
/*!
|
||||
\ingroup PkgAlphaShape2
|
||||
\ingroup PkgAlphaShapes2Ref
|
||||
|
||||
\deprecated The class is deprecated since \cgal 4.10, as the weighted point and the function
|
||||
objects for weighted points are part of the concept `Kernel`. The class is kept for backward
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
/*!
|
||||
\ingroup PkgAlphaShape2Concepts
|
||||
\ingroup PkgAlphaShapes2Concepts
|
||||
\cgalConcept
|
||||
|
||||
The concept `AlphaShapeFace_2` describes the requirements for the base face of an alpha shape.
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue