51 #ifndef CGAL_DIRECTIONS2_H
52 #define CGAL_DIRECTIONS2_H
54 #include <CGAL/SimpleCartesian/VectorS2.h>
69 bool operator<=(const DirectionS2<FT>&
d)
const;
71 bool operator<(const DirectionS2<FT>&
d)
const;
99 { e0 = v.
e0; e1 = v.
e1; }
101 template <
class FT >
106 template <
class FT >
116 template <
class FT >
120 {
return !( *
this ==
d ); }
122 template <
class FT >
127 int quadrant_this = (
dx() >= FT(0)) ? ((
dy() >= FT(0))?1:4)
128 : ((
dy() >= FT(0))?2:3);
129 int quadrant_d = (d.
dx() >= FT(0)) ? ((d.
dy() >= FT(0))?1:4)
130 : ((d.
dy() >= FT(0))?2:3);
132 if(quadrant_this < quadrant_d)
134 else if (quadrant_this > quadrant_d)
137 return dy() * d.
dx() < d.
dy() *
dx();
140 template <
class FT >
144 {
return d < *this ; }
146 template <
class FT >
150 {
return (d < *
this) || (d == *
this) ; }
152 template <
class FT >
156 {
return (*
this < d) || (d == *
this) ; }
158 template <
class FT >
166 return ( *
this < d2 )||( d2 <= d1 );
170 return ( *
this < d2 )&&( d2 <= d1 );
174 template <
class FT >
180 template <
class FT >
192 template <
class FT >
197 template <
class FT >
204 template <
class FT >
210 return (i==0) ?
dx() :
dy();
214 template <
class FT >
220 template <
class FT >
227 #ifndef CGAL_NO_OSTREAM_INSERT_DIRECTIONS2
228 template <
class FT >
230 &operator<<(std::ostream& os, const DirectionS2<FT> &
d)
235 return os << v.
x() <<
' ' << v.
y();
241 return os <<
"DirectionS2(" << v.
x() <<
", " << v.
y() <<
')';
244 #endif // CGAL_NO_OSTREAM_INSERT_DIRECTIONS2
246 #ifndef CGAL_NO_ISTREAM_EXTRACT_DIRECTIONS2
248 template <
class FT >
262 std::cerr << std::endl <<
"Stream must be in ascii or binary mode" << std::endl;
268 #endif // CGAL_NO_ISTREAM_EXTRACT_DIRECTIONS2
bool operator>(const DirectionS2< FT > &d) const
#define CGAL_KERNEL_CTOR_INLINE
DirectionS2< FT > operator-() const
static SURF_BEGIN_NAMESPACE double sign(double x)
void int int REAL REAL * y
#define CGAL_KERNEL_INLINE
const Orientation COUNTERCLOCKWISE
bool operator==(const DirectionS2< FT > &d) const
bool operator>=(const DirectionS2< FT > &d) const
bool operator!=(const DirectionS2< FT > &d) const
#define CGAL_KERNEL_MEDIUM_INLINE
*********************************************************************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
DirectionS2< FT > perpendicular(const Orientation &o) const
bool operator<(const DirectionS2< FT > &d) const
bool operator<=(const DirectionS2< FT > &d) const
void write(std::ostream &os, const T &t, const io_Read_write &)
VectorS2< FT > vector() const
bool counterclockwise_in_between(const DirectionS2< FT > &d1, const DirectionS2< FT > &d2) const
DirectionS2< FT > transform(const Aff_transformationS2< FT > &t) const
void read(std::istream &is, T &t, const io_Read_write &)
#define CGAL_BEGIN_NAMESPACE
const Orientation COLLINEAR
#define CGAL_END_NAMESPACE
#define CGAL_kernel_precondition(EX)