Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
distance_predicatesS3.h
Go to the documentation of this file.
1 // ======================================================================
2 //
3 // Copyright (c) 1999 The CGAL Consortium
4 
5 // This software and related documentation is part of the Computational
6 // Geometry Algorithms Library (CGAL).
7 // This software and documentation is provided "as-is" and without warranty
8 // of any kind. In no event shall the CGAL Consortium be liable for any
9 // damage of any kind.
10 //
11 // Every use of CGAL requires a license.
12 //
13 // Academic research and teaching license
14 // - For academic research and teaching purposes, permission to use and copy
15 // the software and its documentation is hereby granted free of charge,
16 // provided that it is not a component of a commercial product, and this
17 // notice appears in all copies of the software and related documentation.
18 //
19 // Commercial licenses
20 // - A commercial license is available through Algorithmic Solutions, who also
21 // markets LEDA (http://www.algorithmic-solutions.de).
22 // - Commercial users may apply for an evaluation license by writing to
23 // Algorithmic Solutions (contact@algorithmic-solutions.com).
24 //
25 // The CGAL Consortium consists of Utrecht University (The Netherlands),
26 // ETH Zurich (Switzerland), Free University of Berlin (Germany),
27 // INRIA Sophia-Antipolis (France), Martin-Luther-University Halle-Wittenberg
28 // (Germany), Max-Planck-Institute Saarbrucken (Germany), RISC Linz (Austria),
29 // and Tel-Aviv University (Israel).
30 //
31 // ----------------------------------------------------------------------
32 // release : CGAL-2.2
33 // release_date : 2000, September 30
34 //
35 // source : webS3/S3.lw
36 // file : include/CGAL/SimpleCartesian/distance_predicatesS3.h
37 // package : S3 (1.6)
38 // revision : 1.6
39 // revision_date : 28 Jun 2000
40 // author(s) : Stefan Schirra
41 // based on code by
42 // Andreas Fabri and
43 // Herve Brönnimann
44 //
45 // coordinator : MPI, Saarbrücken
46 // email : contact@cgal.org
47 // www : http://www.cgal.org
48 //
49 // ======================================================================
50 
51 #ifndef DISTANCE_PREDICATESS3_H
52 #define DISTANCE_PREDICATESS3_H
53 
54 #include <CGAL/SimpleCartesian/PointS3.h>
57 
59 
60 template < class FT >
64  const PointS3<FT>& q,
65  const PointS3<FT>& r)
66 {
67  return cmp_dist_to_pointC3(p.x(),p.y(),p.z(),
68  q.x(),q.y(),q.z(),
69  r.x(),r.y(),r.z());
70 }
71 
72 template < class FT >
74 bool
76  const PointS3<FT>& q,
77  const PointS3<FT>& r)
78 {
79  return has_larger_dist_to_pointC3(p.x(),p.y(),p.z(),
80  q.x(),q.y(),q.z(),
81  r.x(),r.y(),r.z());
82 }
83 
84 template < class FT >
86 bool
88  const PointS3<FT>& q,
89  const PointS3<FT>& r)
90 {
91  return has_smaller_dist_to_pointC3(p.x(),p.y(),p.z(),
92  q.x(),q.y(),q.z(),
93  r.x(),r.y(),r.z());
94 }
95 template < class FT >
99  const PointS3<FT>& p,
100  const PointS3<FT>& q)
101 {
102  return cmp_signed_dist_to_directionC3(h.a(),h.b(),h.c(),
103  p.x(),p.y(),p.z(),
104  q,x(),q.y(),q.z());
105 }
106 
107 template < class FT >
109 bool
111  const PointS3<FT>& p,
112  const PointS3<FT>& q)
113 {
114  return has_larger_signed_dist_to_directionC3(h.a(),h.b(),h.c(),
115  p.x(),p.y(),p.z(),
116  q,x(),q.y(),q.z());
117 }
118 
119 template < class FT >
121 bool
123  const PointS3<FT>& p,
124  const PointS3<FT>& q)
125 {
126  return has_smaller_signed_dist_to_directionC3(h.a(),h.b(),h.c(),
127  p.x(),p.y(),p.z(),
128  q,x(),q.y(),q.z());
129 }
130 template < class FT >
134  const PointS3<FT>& hq,
135  const PointS3<FT>& hr,
136  const PointS3<FT>& p,
137  const PointS3<FT>& q)
138 {
139  return cmp_signed_dist_to_planeC3(hp.x(),hp.y(),hp.z(),
140  hq.x(),hq.y(),hq.z(),
141  hr.x(),hr.y(),hr.z(),
142  p.x(),p.y(),p.z(),
143  q,x(),q.y(),q.z());
144 }
145 
146 template < class FT >
148 bool
150  const PointS3<FT>& hq,
151  const PointS3<FT>& hr,
152  const PointS3<FT>& p,
153  const PointS3<FT>& q)
154 {
155  return has_larger_signed_dist_to_planeC3(hp.x(),hp.y(),hp.z(),
156  hq.x(),hq.y(),hq.z(),
157  hr.x(),hr.y(),hr.z(),
158  p.x(),p.y(),p.z(),
159  q,x(),q.y(),q.z());
160 }
161 
162 template < class FT >
164 bool
166  const PointS3<FT>& hq,
167  const PointS3<FT>& hr,
168  const PointS3<FT>& p,
169  const PointS3<FT>& q)
170 {
171  return has_smaller_signed_dist_to_planeC3(hp.x(),hp.y(),hp.z(),
172  hq.x(),hq.y(),hq.z(),
173  hr.x(),hr.y(),hr.z(),
174  p.x(),p.y(),p.z(),
175  q,x(),q.y(),q.z());
176 }
177 
178 
180 
181 #endif // DISTANCE_PREDICATESS3_H
CGAL_KERNEL_LARGE_INLINE bool has_smaller_signed_dist_to_plane(const PlaneS3< FT > &h, const PointS3< FT > &p, const PointS3< FT > &q)
CGAL_KERNEL_MEDIUM_INLINE bool has_smaller_signed_dist_to_planeC3(const FT &ppx, const FT &ppy, const FT &ppz, const FT &pqx, const FT &pqy, const FT &pqz, const FT &prx, const FT &pry, const FT &prz, const FT &px, const FT &py, const FT &pz, const FT &qx, const FT &qy, const FT &qz)
CGAL_KERNEL_INLINE Comparison_result cmp_dist_to_pointC3(const FT &px, const FT &py, const FT &pz, const FT &qx, const FT &qy, const FT &qz, const FT &rx, const FT &ry, const FT &rz)
CGAL_KERNEL_MEDIUM_INLINE bool has_larger_signed_dist_to_directionC3(const FT &pa, const FT &pb, const FT &pc, const FT &px, const FT &py, const FT &pz, const FT &qx, const FT &qy, const FT &qz)
CGAL_KERNEL_MEDIUM_INLINE bool has_larger_signed_dist_to_planeC3(const FT &ppx, const FT &ppy, const FT &ppz, const FT &pqx, const FT &pqy, const FT &pqz, const FT &prx, const FT &pry, const FT &prz, const FT &px, const FT &py, const FT &pz, const FT &qx, const FT &qy, const FT &qz)
CGAL_KERNEL_MEDIUM_INLINE Comparison_result cmp_signed_dist_to_planeC3(const FT &ppx, const FT &ppy, const FT &ppz, const FT &pqx, const FT &pqy, const FT &pqz, const FT &prx, const FT &pry, const FT &prz, const FT &px, const FT &py, const FT &pz, const FT &qx, const FT &qy, const FT &qz)
CGAL_KERNEL_LARGE_INLINE bool has_larger_dist_to_point(const PointS3< FT > &p, const PointS3< FT > &q, const PointS3< FT > &r)
const FT & c() const
Definition: PlaneS3.h:229
CGAL_KERNEL_LARGE_INLINE bool has_larger_signed_dist_to_plane(const PlaneS3< FT > &h, const PointS3< FT > &p, const PointS3< FT > &q)
CGAL_KERNEL_MEDIUM_INLINE bool has_smaller_signed_dist_to_directionC3(const FT &pa, const FT &pb, const FT &pc, const FT &px, const FT &py, const FT &pz, const FT &qx, const FT &qy, const FT &qz)
#define CGAL_KERNEL_LARGE_INLINE
Definition: kernel_basic.h:56
const FT & b() const
Definition: PlaneS3.h:224
void int int REAL * x
Definition: read.cpp:74
CGAL_KERNEL_MEDIUM_INLINE bool has_larger_dist_to_pointC3(const FT &px, const FT &py, const FT &pz, const FT &qx, const FT &qy, const FT &qz, const FT &rx, const FT &ry, const FT &rz)
Comparison_result
Definition: enum.h:94
const FT & a() const
Definition: PlaneS3.h:219
NT q
CGAL_KERNEL_LARGE_INLINE bool has_smaller_dist_to_point(const PointS3< FT > &p, const PointS3< FT > &q, const PointS3< FT > &r)
#define CGAL_BEGIN_NAMESPACE
Definition: kdtree_d.h:86
CGAL_KERNEL_MEDIUM_INLINE Comparison_result cmp_signed_dist_to_directionC3(const FT &pa, const FT &pb, const FT &pc, const FT &px, const FT &py, const FT &pz, const FT &qx, const FT &qy, const FT &qz)
#define CGAL_END_NAMESPACE
Definition: kdtree_d.h:87
CGAL_KERNEL_LARGE_INLINE Comparison_result cmp_signed_dist_to_plane(const PlaneS3< FT > &h, const PointS3< FT > &p, const PointS3< FT > &q)
CGAL_BEGIN_NAMESPACE CGAL_KERNEL_LARGE_INLINE Comparison_result cmp_dist_to_point(const PointS3< FT > &p, const PointS3< FT > &q, const PointS3< FT > &r)
CGAL_KERNEL_MEDIUM_INLINE bool has_smaller_dist_to_pointC3(const FT &px, const FT &py, const FT &pz, const FT &qx, const FT &qy, const FT &qz, const FT &rx, const FT &ry, const FT &rz)