25 #ifndef CGAL_OPT_SIMPLE_CARTESIAN_VECTOR_2_H
26 #define CGAL_OPT_SIMPLE_CARTESIAN_VECTOR_2_H
49 int id()
const {
return (
int)
this; }
51 FT
hx()
const {
return _x; }
52 FT
hy()
const {
return _y; }
53 FT
hw()
const {
return FT(1); }
56 const FT&
x()
const {
return _x; }
57 const FT&
y()
const {
return _y; }
58 FT&
x() {
return _x; }
59 FT&
y() {
return _y; }
63 return (i == 0) ?
_x :
_y;
68 return (i == 0) ?
_x :
_y;
94 {
_x *= c;
_y *=c;
return *
this; }
96 {
_x /= c;
_y /=c;
return *
this; }
99 {
_x *= v.
_x;
_y *=v.
_y;
return *
this; }
101 {
_x /= v.
_x;
_y /=v.
_y;
return *
this; }
113 {
return reinterpret_cast<const Direction&
>(*this); }
118 template <
class _RR >
123 template <
class _RR >
124 std::ostream &operator<<(std::ostream &os, const VectorS2<_RR> &
v) {
127 return os <<
v.x() <<
' ' <<
v.y();
133 return os <<
"VectorS2(" <<
v.x() <<
", " <<
v.y() <<
')';
137 template <
class _RR >
141 is >> v.
x() >> v.
y();
148 std::cerr <<
"\nStream must be in ascii or binary mode\n";
156 #endif // CGAL_OPT_SIMPLE_CARTESIAN_VECTOR_2_H
Vector_3< T > operator*(T t, const Vector_3< T > &v)
Self operator-(const Null_vector &) const
const Orientation COUNTERCLOCKWISE
Self & operator+=(const Self &v)
Aff_transformationS2< FT > Aff_transformation
Self & operator=(const Self &v)
Self & operator/=(const Self &v)
const FT & cartesian(int i) const
const FT & operator[](int i) const
Self operator/(const FT &c) const
Self operator-(const Self &v) const
FT cartesian(int i) const
const Direction & direction() const
Self & operator-=(const Self &v)
*********************************************************************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
FT homogeneous(int i) const
Self perpendicular(const Orientation &o) const
Self transform(const Aff_transformation &t) const
void write(std::ostream &os, const T &t, const io_Read_write &)
VectorS2(const FT &x, const FT &y)
bool operator==(const Null_vector &) const
VectorS2(const FT &hx, const FT &hy, const FT &hw)
Self operator+(const Self &v) const
FT operator*(const Self &v) const
VectorS2(const Null_vector &)
Self & operator*=(const Self &v)
bool operator==(const Self &v) const
void read(std::istream &is, T &t, const io_Read_write &)
Self & operator*=(const FT c)
#define CGAL_BEGIN_NAMESPACE
const Orientation COLLINEAR
#define CGAL_END_NAMESPACE
#define CGAL_kernel_precondition(EX)
Self & operator/=(const FT c)
DirectionS2< FT > Direction