48 #ifndef CGAL_CONSTRUCTIONS_KERNEL_FTC3_H
49 #define CGAL_CONSTRUCTIONS_KERNEL_FTC3_H
59 const FT &qx,
const FT &qy,
const FT &qz,
62 FT half = FT(1) / FT(2);
71 const FT &qx,
const FT &qy,
const FT &qz,
72 const FT &rx,
const FT &ry,
const FT &rz,
73 const FT &sx,
const FT &sy,
const FT &sz,
103 FT
inv = FT(1)/(FT(2) *
den);
110 template <
class FT >
113 const FT &qx,
const FT &qy,
const FT &qz,
114 const FT &sx,
const FT &sy,
const FT &sz,
126 FT rsx = psy*qsz-psz*qsy;
127 FT rsy = psz*qsx-psx*qsz;
128 FT rsz = psx*qsy-psy*qsx;
143 FT
inv = FT(1)/(FT(2) *
den);
154 const FT &ldx,
const FT &ldy,
const FT &ldz,
167 const FT &lpx,
const FT &lpy,
const FT &lpz,
168 const FT &ldx,
const FT &ldy,
const FT &ldz,
175 FT lambda = (ldx*dpx+ldy*dpy+ldz*dpz) / (ldx*ldx+ldy*ldy+ldz*ldz);
176 x = lpx + lambda * ldx;
177 y = lpy + lambda * ldy;
178 z = lpz + lambda * ldz;
185 const FT &qx,
const FT &qy,
const FT &qz,
186 const FT &rx,
const FT &ry,
const FT &rz,
187 FT &pa, FT &pb, FT &pc, FT &pd)
196 pa = rpy*rqz - rqy*rpz;
197 pb = rpz*rqx - rqz*rpx;
198 pc = rpx*rqy - rqx*rpy;
199 pd = - pa*rx - pb*ry - pc*rz;
206 const FT &
dx,
const FT &
dy,
const FT &dz,
207 FT &pa, FT &pb, FT &pc, FT &pd)
210 pa =
dx; pb =
dy; pc = dz; pd = -dx*px - dy*py - dz*pz;
220 if (pa != FT(0)) x = -pd/pa;
221 else if (pb != FT(0)) y = -pd/pb;
229 const FT &px,
const FT &py,
const FT &pz,
237 FT num = pa*px + pb*py + pc*pz + pd;
238 FT
den = pa*pa + pb*pb + pc*pc;
239 FT lambda = num /
den;
241 x = px - lambda * pa;
242 y = py - lambda * pb;
243 z = pz - lambda * pc;
246 template <
class FT >
250 const FT &qx,
const FT &qy,
const FT &qz)
256 template <
class FT >
260 const FT &px,
const FT &py,
const FT &pz)
262 return pa*px + pb*py + pc*pz;
265 template <
class FT >
269 const FT &pa,
const FT &pb,
const FT &pc,
const FT &pd,
270 const FT &px,
const FT &py,
const FT &pz)
272 return pa*px + pb*py + pc*pz + pd;
275 template <
class FT >
279 const FT &ppx,
const FT &ppy,
const FT &ppz,
280 const FT &pqx,
const FT &pqy,
const FT &pqz,
281 const FT &prx,
const FT &pry,
const FT &prz,
282 const FT &px,
const FT &py,
const FT &pz)
285 pqx-px,pqy-py,pqz-pz,
286 prx-px,pry-py,prz-pz);
291 #endif // CGAL_CONSTRUCTIONS_KERNEL_FTC3_H
CGAL_KERNEL_MEDIUM_INLINE void projection_planeC3(const FT &pa, const FT &pb, const FT &pc, const FT &pd, const FT &px, const FT &py, const FT &pz, FT &x, FT &y, FT &z)
void int int REAL REAL * y
#define CGAL_KERNEL_INLINE
CGAL_KERNEL_MEDIUM_INLINE FT det3x3_by_formula(const FT &a00, const FT &a01, const FT &a02, const FT &a10, const FT &a11, const FT &a12, const FT &a20, const FT &a21, const FT &a22)
CGAL_KERNEL_INLINE FT scaled_distance_to_planeC3(const FT &pa, const FT &pb, const FT &pc, const FT &pd, const FT &px, const FT &py, const FT &pz)
#define CGAL_KERNEL_MEDIUM_INLINE
CGAL_KERNEL_MEDIUM_INLINE void plane_from_pointsC3(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, FT &pa, FT &pb, FT &pc, FT &pd)
CGAL_KERNEL_MEDIUM_INLINE void plane_from_point_directionC3(const FT &px, const FT &py, const FT &pz, const FT &dx, const FT &dy, const FT &dz, FT &pa, FT &pb, FT &pc, FT &pd)
void int int int REAL REAL REAL * z
CGAL_KERNEL_INLINE FT squared_distanceC3(const FT &px, const FT &py, const FT &pz, const FT &qx, const FT &qy, const FT &qz)
CGAL_BEGIN_NAMESPACE CGAL_KERNEL_INLINE void midpointC3(const FT &px, const FT &py, const FT &pz, const FT &qx, const FT &qy, const FT &qz, FT &x, FT &y, FT &z)
CGAL_KERNEL_MEDIUM_INLINE void point_on_planeC3(const FT &pa, const FT &pb, const FT &pc, const FT &pd, FT &x, FT &y, FT &z)
void inv(Matrix3D &Ainv, const Matrix3D &A)
void circumcenterC3(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, const FT &sx, const FT &sy, const FT &sz, FT &x, FT &y, FT &z)
#define CGAL_BEGIN_NAMESPACE
CGAL_KERNEL_MEDIUM_INLINE void point_on_lineC3(const FT &lpx, const FT &lpy, const FT &lpz, const FT &ldx, const FT &ldy, const FT &ldz, int i, FT &x, FT &y, FT &z)
CGAL_KERNEL_INLINE FT scaled_distance_to_directionC3(const FT &pa, const FT &pb, const FT &pc, const FT &px, const FT &py, const FT &pz)
#define CGAL_kernel_assertion(EX)
#define CGAL_END_NAMESPACE
CGAL_KERNEL_MEDIUM_INLINE void projection_lineC3(const FT &px, const FT &py, const FT &pz, const FT &lpx, const FT &lpy, const FT &lpz, const FT &ldx, const FT &ldy, const FT &ldz, FT &x, FT &y, FT &z)