68 LineS2(
const FT&
a,
const FT &
b,
const FT &
c);
106 void new_rep(
const FT& a,
const FT &b,
const FT &c);
115 template <
class FT >
120 template <
class FT >
126 e2 = p.
x()*q.
y() - p.
y()*q.
x();
129 template <
class FT >
138 template <
class FT >
143 template <
class FT >
148 template <
class FT >
153 template <
class FT >
158 template <
class FT >
161 { new_rep(-d.
dy(), d.
dx(), -d.
dx()* p.
y() + d.
dy() * p.
x()); }
164 template <
class FT >
168 if ( (a() * l.
c() != l.
a() * c())
169 ||(b() * l.
c() != l.
b() * c()) )
174 return (sc == 0) ? ( a()*l.
b() == b()*l.
a() )
181 template <
class FT >
184 {
return !(*
this == l); }
186 template <
class FT >
191 template <
class FT >
196 template <
class FT >
201 template <
class FT >
206 "Line::x_at_y(const FT& y) is undefined for horizontal line" );
207 return ( -b()*y - c() ) / a();
210 template <
class FT >
215 "Line::x_at_y(const FT& y) is undefined for vertical line");
216 return ( -a()*x - c() ) / b();
219 template <
class FT >
222 {
return LineS2<FT>( -b() , a() , b() * p.
x() - a() * p.
y() ); }
224 template <
class FT >
229 template <
class FT >
234 return is_vertical() ?
PointS2<FT>( (-b()-c())/a(), FT(1) )
237 return is_vertical() ?
PointS2<FT>( (-b()-c())/a() + b(), FT(1) - a() )
238 :
PointS2<FT>( FT(1) + b(), -(a()+c())/b() - a() );
241 return PointS2<FT>( (-b()-c())/a() + FT(i)*b(), FT(1) - FT(i)*a() );
242 return PointS2<FT>( FT(1) + FT(i)*b(), -(a()+c())/b() - FT(i)*a() );
245 template <
class FT >
249 return is_vertical() ?
PointS2<FT>( (-b()-c())/a(), FT(1) )
253 template <
class FT >
263 FT ab = a()/b(), ba = b()/a(), ca = c()/a();
264 FT
y = ( -p.
x() + ab*p.
y() - ca ) / ( ba + ab );
268 template <
class FT >
273 template <
class FT >
278 template <
class FT >
281 {
return (a()*p.
x() + b()*p.
y() + c()) == FT(0); }
283 template <
class FT >
286 {
return (a()*p.
x() + b()*p.
y() + c()) > FT(0); }
288 template <
class FT >
291 {
return (a()*p.
x() + b()*p.
y() + c()) < FT(0); }
293 template <
class FT >
296 {
return a() == FT(0) ; }
298 template <
class FT >
301 {
return b() == FT(0) ; }
303 template <
class FT >
306 {
return (a() == FT(0)) && (b() == FT(0)) ; }
308 template <
class FT >
315 #ifndef CGAL_NO_OSTREAM_INSERT_LINES2
316 template <
class FT >
317 std::ostream& operator<<(std::ostream &os, const LineS2<FT> &l)
322 return os << l.a() <<
' ' << l.b() <<
' ' << l.c();
329 return os <<
"LineS2(" << l.a() <<
", " << l.b() <<
", " << l.c() <<
')';
332 #endif // CGAL_NO_OSTREAM_INSERT_LINES2
334 #ifndef CGAL_NO_ISTREAM_EXTRACT_LINES2
335 template <
class FT >
349 std::cerr <<
"" << std::endl;
350 std::cerr <<
"Stream must be in ascii or binary mode" << std::endl;
356 #endif // CGAL_NO_ISTREAM_EXTRACT_LINES2
362 #endif // CGAL_LINES2_H
#define CGAL_kernel_precondition_msg(EX, MSG)
DirectionS2< FT > direction() const
bool is_degenerate() const
FT x_at_y(const FT &y) const
static SURF_BEGIN_NAMESPACE double sign(double x)
void int int REAL REAL * y
void new_rep(const PointS2< FT > &p, const PointS2< FT > &q)
#define CGAL_KERNEL_INLINE
LineS2< FT > transform(const Aff_transformationS2< FT > &t) const
#define CGAL_KERNEL_MEDIUM_INLINE
const PointS2< FT > & start() const
PointS2< FT > second_point() const
const PointS2< FT > & start() const
PointS2< FT > point() const
void write(std::ostream &os, const T &t, const io_Read_write &)
bool has_on_boundary(const PointS2< FT > &p) const
Oriented_side oriented_side(const PointS2< FT > &p) const
LineS2< FT > perpendicular(const PointS2< FT > &p) const
FT y_at_x(const FT &x) const
bool operator!=(const LineS2< FT > &l) const
bool has_on_positive_side(const PointS2< FT > &p) const
bool is_horizontal() const
const PointS2< FT > & end() const
PointS2< FT > projection(const PointS2< FT > &p) const
void read(std::istream &is, T &t, const io_Read_write &)
bool operator==(const LineS2< FT > &l) const
#define CGAL_BEGIN_NAMESPACE
LineS2< FT > opposite() const
#define CGAL_END_NAMESPACE
bool has_on_negative_side(const PointS2< FT > &p) const