没有合适的资源?快使用搜索试试~ 我知道了~
首页cgal_manual.pdf
cgal_manual.pdf

CGAL是老外开发的几何运算的开发工具包(包括线、面、多边形、多面体等几何题的计算)。可以用于三维显示系统的开发。这里是其开发手册,大家可以看看。我在我的工程项目中使用后,感觉超好用,大大提高开发进度和软件稳定行维护行。
资源详情
资源评论
资源推荐

Warning: last hides rb_tree<const CGAL__Hlv<CGAL_Vertex_max_base<CGAL_Point_3<CGAL_C
artesian<double>>>, CGAL_Halfedge_max_base, CGAL_Polyhedron_facet_base_3<CGAL_Cartes
ian<double>>>*, pair<const CGAL__Hlv<CGAL_Vertex_max_base<CGAL_Point_3<CGAL_Cartesia
n<double>>>, CGAL_Halfedge_max_base, CGAL_Polyhedron_facet_base_3<CGAL_Cartesian<dou
ble>>>* const, CGAL__Hlv<CGAL_Vertex_max_base<CGAL_Point_3<CGAL_Cartesian<double>>>,
CGAL_Halfedge_max_base, CGAL_Polyhedron_facet_base_3<CGAL_Cartesian<double>>>*>, sel
ect1st<pair<const CGAL__Hlv<CGAL_Vertex_max_base<CGAL_Point_3<CGAL_Cartesian<double>
>>, CGAL_Halfedge_max_base, CGAL_Polyhedron_facet_base_3<CGAL_Cartesian<double>>>* c
onst, CGAL__Hlv<CGAL_Vertex_max_base<CGAL_Point_3<CGAL_Cartesian<double>>>, CGAL_Hal
fedge_max_base, CGAL_Polyhedron_facet_base_3<CGAL_Cartesian<double>>>*>, const CGAL_
_Hlv<CGAL_Vertex_max_base<CGAL_Point_3<CGAL_Cartesian<double>>>, CGAL_Halfedge_max_b
ase, CGAL_Polyhedron_facet_base_3<CGAL_Cartesian<double>>>*>, less<const CGAL__Hlv<C
GAL_Vertex_max_base<CGAL_Point_3<CGAL_Cartesian<double>>>, CGAL_Halfedge_max_base, C
GAL_Polyhedron_facet_base_3<CGAL_Cartesian<double>>>*>>::last while instantiating "r
b_tree<const CGAL__Hlv<CGAL_Vertex_max_base<CGAL_Point_3<CGAL_Cartesian<double>>>, C
GAL_Halfedge_max_base, CGAL_Polyhedron_facet_base_3<CGAL_Cartesian<double>>>*, pair<
const CGAL__Hlv<CGAL_Vertex_max_base<CGAL_Point_3<CGAL_Cartesian<double>>>, CGAL_Hal
fedge_max_base, CGAL_Polyhedron_facet_base_3<CGAL_Cartesian<double>>>* const, CGAL__
Hlv<CGAL_Vertex_max_base<CGAL_Point_3<CGAL_Cartesian<double>>>, CGAL_Halfedge_max_ba
se, CGAL_Polyhedron_facet_base_3<CGAL_Cartesian<double>>>*>, select1st<pair<const CG
AL__Hlv<CGAL_Vertex_max_base<CGAL_Point_3<CGAL_Cartesian<double>>>, CGAL_Halfedge_ma
x_base, CGAL_Polyhedron_facet_base_3<CGAL_Cartesian<double>>>* const, CGAL__Hlv<CGAL
_Vertex_max_base<CGAL_Point_3<CGAL_Cartesian<double>>>, CGAL_Halfedge_max_base, CGAL
_Polyhedron_facet_base_3<CGAL_Cartesian<double>>>*>, const CGAL__Hlv<CGAL_Vertex_max
_base<CGAL_Point_3<CGAL_Cartesian<double>>>, CGAL_Halfedge_max_base, CGAL_Polyhedron
_facet_base_3<CGAL_Cartesian<double>>>*>, less<const CGAL__Hlv<CGAL_Vertex_max_base<
CGAL_Point_3<CGAL_Cartesian<double>>>, CGAL_Halfedge_max_base, CGAL_Polyhedron_facet
_base_3<CGAL_Cartesian<double>>>*>>::erase(rb_tree<const CGAL__Hlv<CGAL_Vertex_max_b
ase<CGAL_Point_3<CGAL_Cartesian<double>>>, CGAL_Halfedge_max_base, CGAL_Polyhedron_f
acet_base_3<CGAL_Cartesian<double>>>*, pair<const CGAL__Hlv<CGAL_Vertex_max_base<CGA
L_Point_3<CGAL_Cartesian<double>>>, CGAL_Halfedge_max_base, CGAL_Polyhedron_facet_ba
se_3<CGAL_Cartesian<double>>>* const, CGAL__Hlv<CGAL_Vertex_max_base<CGAL_Point_3<CG
AL_Cartesian<double>>>, CGAL_Halfedge_max_base, CGAL_Polyhedron_facet_base_3<CGAL_Ca
rtesian<double>>>*>, select1st<pair<const CGAL__Hlv<CGAL_Vertex_max_base<CGAL_Point_
3<CGAL_Cartesian<double>>>, CGAL_Halfedge_max_base, CGAL_Polyhedron_facet_base_3<CGA
L_Cartesian<double>>>* const, CGAL__Hlv<CGAL_Vertex_max_base<CGAL_Point_3<CGAL_Carte
sian<double>>>, CGAL_Halfedge_max_base, CGAL_Polyhedron_facet_base_3<CGAL_Cartesian<
double>>>*>, const CGAL__Hlv<CGAL_Vertex_max_base<CGAL_Point_3<CGAL_Cartesian<double
>>>, CGAL_Halfedge_max_base, CGAL_Polyhedron_facet_base_3<CGAL_Cartesian<double>>>*>
, less<const CGAL__Hlv<CGAL_Vertex_max_base<CGAL_Point_3<CGAL_Cartesian<double>>>, C
GAL_Halfedge_max_base, CGAL_Polyhedron_facet_base_3<CGAL_Cartesian<double>>>*>>::ite
rator(local), rb_tree<const CGAL__Hlv<CGAL_Vertex_max_base<CGAL_Point_3<CGAL_Cartesi
an<double>>>, CGAL_Halfedge_max_base, CGAL_Polyhedron_facet_base_3<CGAL_Cartesian<do
uble>>>*, pair<const CGAL__Hlv<CGAL_Vertex_max_base<CGAL_Point_3<CGAL_Cartesian<doub
le>>>, CGAL_Halfedge_max_base, CGAL_Polyhedron_facet_base_3<CGAL_Cartesian<double>>>
* const, CGAL__Hlv<CGAL_Vertex_max_base<CGAL_Point_3<CGAL_Cartesian<double>>>, CGAL_
Halfedge_max_base, CGAL_Polyhedron_facet_base_3<CGAL_Cartesian<double>>>*>, select1s
t<pair<const CGAL__Hlv<CGAL_Vertex_max_base<CGAL_Point_3<CGAL_Cartesian<double>>>, C
GAL_Halfedge_max_base, CGAL_Polyhedron_facet_base_3<CGAL_Cartesian<double>>>* const,
CGAL__Hlv<CGAL_Vertex_max_base<CGAL_Point_3<CGAL_Cartesian<double>>>, CGAL_Halfedge
_max_base, CGAL_Polyhedron_facet_base_3<CGAL_Cartesian<double>>>*>,const CGAL__Hlv<C
GAL_Vertex_max_base<CGAL_Point_3<CGAL_Cartesian<double>>>, CGAL_Halfedge_max_base, C
GAL_Polyhedron_facet_base_3<CGAL_Cartesian<double>>>*>, less<const CGAL__Hlv<CGAL_Ve
rtex_max_base<CGAL_Point_3<CGAL_Cartesian<double>>>, CGAL_Halfedge_max_base, CGAL_Po
Developers’
Manual
Release 3.3.1
25 August 2007

2

Contents
1 Introduction 1
1.1 Primary design goals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 The overall design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2 Coding Conventions 5
2.1 Naming scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2 Programming conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.3 Code format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.4 File header . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3 Geometry Kernels 11
3.1 Cartesian and homogeneous representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.2 Cartesian versus homogeneous computation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.3 Available kernels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.4 Kernel design and conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.5 Number-type based predicates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.6 Missing functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4 Traits Classes 15
4.1 What are traits classes in CGAL? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.2 Why are traits classes in CGAL? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.3 An example – planar convex hulls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.4 Alphabetical List of Reference Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.5 Kernel as traits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
i

5 Checks: Pre- and Postconditions, Assertions, and Warnings 19
5.1 Categories of checks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
5.2 Using checks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
5.3 Controlling checks at a finer granularity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
5.4 Exception handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
6 Reference Counting and Handle Types 23
6.1 Reference counting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
6.2 Handle & Rep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
6.3 Using Handle & Rep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
6.4 Templated handles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
6.5 Using templated handles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
6.6 Allocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
7 Memory Management 29
7.1 The C
++
standard allocator interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
7.2 The allocator macro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
7.3 Using the allocator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
8 Namespaces 33
8.1 What are namespaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
8.2 Namespace std . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
8.3 Namespace CGAL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
8.4 Name lookup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
8.5 Namespace CGAL::NTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
9 Polymorphic Return Types 39
10 Iterators and Circulators (and Handles) 41
10.1 Iterator and circulator traits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
10.2 Input and output iterators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
10.3 Writing code with and for iterators, circulators, and handles . . . . . . . . . . . . . . . . . . . . 44
ii

11 Robustness Issues 47
11.1 The role of predicates and constructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
12 Portability Issues 49
12.1 Checking for LEDA or GMP support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
12.2 Using Boost . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
12.3 Using the version-number and configuration macros and flags . . . . . . . . . . . . . . . . . . . 51
12.4 Identifying compilers and architectures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
12.5 Known problems and workarounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
13 Debugging Tips 57
13.1 Graphical debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
13.2 Cross-checkers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
13.3 Examining the values of variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
14 Editorial Committee 61
15 Recommended Reading 63
Index 66
iii
剩余75页未读,继续阅读










安全验证
文档复制为VIP权益,开通VIP直接复制

评论2