51 #ifndef CGAL_VECTORS2_H
52 #define CGAL_VECTORS2_H
54 #include <CGAL/SimpleCartesian/PointS2.h>
116 template <
class FT >
119 template <
class FT >
123 template <
class FT >
128 {
e0 = hx/hw;
e1 = hy/hw; }
130 {
e0 = hx;
e1 = hy; }
133 template <
class FT >
137 template <
class FT >
142 template <
class FT >
147 template <
class FT >
150 {
return (
x() == v.
x()) && (
y() == v.
y()); }
152 template <
class FT >
155 {
return !(*
this ==
v); }
157 template <
class FT >
160 {
return (
x() == FT(0)) && (
y() == FT(0)); }
162 template <
class FT >
165 {
return !(*
this ==
v); }
167 template <
class FT >
174 template <
class FT >
181 template <
class FT >
186 return (i == 0) ?
x() :
y();
189 template <
class FT >
192 {
return cartesian(i); }
194 template <
class FT >
199 template <
class FT >
204 template <
class FT >
209 template <
class FT >
214 template <
class FT >
217 {
return (i == 2) ? FT(1) : cartesian(i); }
219 template <
class FT >
224 template <
class FT >
229 template <
class FT >
234 template <
class FT >
237 {
return x() * w.
x() +
y() * w.
y() ; }
239 template <
class FT >
244 template <
class FT >
249 template <
class FT >
254 template <
class FT >
265 template <
class FT >
272 #ifndef CGAL_NO_OSTREAM_INSERT_VECTORS2
273 template <
class FT >
274 std::ostream& operator<<(std::ostream &os, const VectorS2<FT> &
v)
278 return os <<
v.x() <<
' ' <<
v.y();
284 return os <<
"VectorS2(" <<
v.x() <<
", " <<
v.y() <<
')';
287 #endif // CGAL_NO_OSTREAM_INSERT_VECTORS2
289 #ifndef CGAL_NO_ISTREAM_EXTRACT_VECTORS2
290 template <
class FT >
303 std::cerr <<
"" << std::endl;
304 std::cerr <<
"Stream must be in ascii or binary mode" << std::endl;
310 #endif // CGAL_NO_ISTREAM_EXTRACT_VECTORS2
VectorS2< FT > operator+(const VectorS2< FT > &w) const
#define CGAL_KERNEL_CTOR_INLINE
Vector_3< T > operator*(T t, const Vector_3< T > &v)
bool operator!=(const VectorS2< FT > &v) const
void int int REAL REAL * y
#define CGAL_KERNEL_INLINE
const Orientation COUNTERCLOCKWISE
VectorS2< FT > transform(const Aff_transformationS2< FT > &) const
bool operator==(const VectorS2< FT > &v) const
FT cartesian(int i) 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
VectorS2< FT > operator/(const FT &c) const
DirectionS2< FT > direction() const
FT operator*(const VectorS2< FT > &w) const
void write(std::ostream &os, const T &t, const io_Read_write &)
FT homogeneous(int i) const
#define CGAL_KERNEL_CTOR_MEDIUM_INLINE
VectorS2< FT > perpendicular(const Orientation &o) const
void read(std::istream &is, T &t, const io_Read_write &)
#define CGAL_BEGIN_NAMESPACE
VectorS2< FT > operator-() const
const Orientation COLLINEAR
#define CGAL_kernel_precondition(EX)
#define CGAL_END_NAMESPACE
FT operator[](int i) const