51 #ifndef CGAL_PLANES3_H
52 #define CGAL_PLANES3_H
54 #include <CGAL/SimpleCartesian/PointS2.h>
73 const FT&
c,
const FT&
d);
120 const FT&
c,
const FT&
d);
129 template <
class FT >
140 template <
class FT >
147 FT rpx = p.
x()-r.
x();
148 FT rpy = p.
y()-r.
y();
149 FT rpz = p.
z()-r.
z();
150 FT rqx = q.
x()-r.
x();
151 FT rqy = q.
y()-r.
y();
152 FT rqz = q.
z()-r.
z();
154 e0 = rpy*rqz - rqy*rpz;
155 e1 = rpz*rqx - rqz*rpx;
156 e2 = rpx*rqy - rqx*rpy;
157 e3 = - e0*r.
x() - e1*r.
y() - e2*r.
z();
168 template <
class FT >
172 { new_rep(p, q, r); }
174 template <
class FT >
177 new_rep(d.
dx(), d.
dy(),
179 -d.
dx() * p.
x() - d.
dy() * p.
y() - d.
dz() * p.
z());
182 template <
class FT >
184 { new_rep(v.
x(), v.
y(), v.
z(), -v.
x() * p.
x() - v.
y() * p.
y() - v.
z() * p.
z()); }
186 template <
class FT >
188 { new_rep(a, b, c, d); }
190 template <
class FT >
194 template <
class FT >
198 template <
class FT >
203 template <
class FT >
206 return has_on_boundary(p.
point()) &&
211 template <
class FT >
214 return !(*
this == p);
217 template <
class FT >
222 template <
class FT >
227 template <
class FT >
232 template <
class FT >
237 template <
class FT >
248 template <
class FT >
255 template <
class FT >
262 template <
class FT >
268 template <
class FT >
284 template <
class FT >
305 template <
class FT >
312 FT alpha, beta, gamma;
315 v1.
x(), v1.
y(), v1.
z(),
316 v2.
x(), v2.
y(), v2.
z(),
317 v3.
x(), v3.
y(), v3.
z(),
323 template <
class FT >
330 FT alpha, beta, gamma;
333 v1.
x(), v1.
y(), v1.
z(),
334 v2.
x(), v2.
y(), v2.
z(),
335 v3.
x(), v3.
y(), v3.
z(),
342 template <
class FT >
347 return point() + p.
x() * e1 + p.
y() * e2;
350 template <
class FT >
352 {
return LineS3<FT>(p, orthogonal_direction()); }
355 template <
class FT >
360 template <
class FT >
375 template <
class FT >
379 template <
class FT >
382 return (a()*p.
x() + b()*p.
y() + c()*p.
z() +
d()) == FT(0);
385 template <
class FT >
388 return has_on_boundary(l.
point())
392 template <
class FT >
395 return (a()*p.
x() + b()*p.
y() + c()*p.
z() +
d()) > FT(0);
398 template <
class FT >
401 return (a()*p.
x() + b()*p.
y() + c()*p.
z() +
d()) < FT(0);
405 template <
class FT >
408 return (a() == FT(0)) && (b() == FT(0)) && (c() == FT(0));
412 #ifndef CGAL_NO_OSTREAM_INSERT_PLANES3
413 template <
class FT >
414 std::ostream& operator<<(std::ostream& os, const PlaneS3<FT>& p)
418 return os << p.a() <<
' ' << p.b() <<
' ' << p.c() <<
' ' << p.d();
426 os <<
"PlaneS3(" << p.a() <<
", " << p.b() <<
", ";
427 os << p.c() <<
", " << p.d() <<
")";
431 #endif // CGAL_NO_OSTREAM_INSERT_PLANES3
433 #ifndef CGAL_NO_ISTREAM_EXTRACT_PLANES3
434 template <
class FT >
440 is >> a >> b >> c >>
d;
450 cerr <<
"Stream must be in ascii or binary mode" << endl;
456 #endif // CGAL_NO_ISTREAM_EXTRACT_PLANES3
461 #endif // CGAL_PLANES3_H
Oriented_side oriented_side(const PointS3< FT > &p) const
PlaneS3 transform(const Aff_transformationS3< FT > &t) const
static SURF_BEGIN_NAMESPACE double sign(double x)
bool operator==(const PlaneS3< FT > &p) const
bool has_on_negative_side(const PointS3< FT > &l) const
bool has_on_positive_side(const PointS3< FT > &l) const
PointS3< FT > projection(const PointS3< FT > &p) const
PointS3< FT > start() const
PointS3< FT > point() const
bool operator!=(const PlaneS3< FT > &p) const
bool has_on_boundary(const PointS3< FT > &p) const
PointS3< FT > to_3d(const PointS2< FT > &p) const
*********************************************************************Illinois Open Source License ****University of Illinois NCSA **Open Source License University of Illinois All rights reserved ****Developed free of to any person **obtaining a copy of this software and associated documentation to deal with the Software without including without limitation the rights to and or **sell copies of the and to permit persons to whom the **Software is furnished to do subject to the following this list of conditions and the following disclaimers ****Redistributions in binary form must reproduce the above **copyright this list of conditions and the following **disclaimers in the documentation and or other materials **provided with the distribution ****Neither the names of the Center for Simulation of Advanced the University of nor the names of its **contributors may be used to endorse or promote products derived **from this Software without specific prior written permission ****THE SOFTWARE IS PROVIDED AS WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **ARISING OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE v
void write(std::ostream &os, const T &t, const io_Read_write &)
void new_rep(const PointS3< FT > &p, const PointS3< FT > &q, const PointS3< FT > &r)
PointS3< FT > end() const
PointS3< FT > point() const
VectorS3< FT > orthogonal_vector() const
PointS3< FT > second_point() const
VectorS3< FT > base2() const
PointS2< FT > to_2d(const PointS3< FT > &p) const
VectorS3< FT > base1() const
void read(std::istream &is, T &t, const io_Read_write &)
PointS3< FT > to_plane_basis(const PointS3< FT > &p) const
bool is_degenerate() const
DirectionS3< FT > orthogonal_direction() const
CGAL_KERNEL_LARGE_INLINE PointS3< FT > projection(const PointS3< FT > &p, const PlaneS3< FT > &h)
#define CGAL_BEGIN_NAMESPACE
DirectionS3< FT > direction() const
PointS3< FT > start() const
LineS3< FT > perpendicular_line(const PointS3< FT > &p) const
#define CGAL_END_NAMESPACE
CGAL_BEGIN_NAMESPACE void solve(const FT &a1, const FT &a2, const FT &a3, const FT &b1, const FT &b2, const FT &b3, const FT &c1, const FT &c2, const FT &c3, const FT &d1, const FT &d2, const FT &d3, FT &x, FT &y, FT &z)