51 #ifndef CGAL_VECTOR_2_H
52 #define CGAL_VECTOR_2_H
54 #ifndef CGAL_REP_CLASS_DEFINED
55 #error no representation class defined
56 #endif // CGAL_REP_CLASS_DEFINED
58 #ifndef CGAL_POINT_2_H
60 #endif // CGAL_POINT_2_H
63 #ifndef CGAL_DIRECTION_2_H
65 #endif // CGAL_DIRECTION_2_H
70 #ifndef VECTOR_2_RFT_WRAPPER_H
71 #include <CGAL/Vector_2_rft_wrapper.h>
72 #endif // VECTOR_2_RFT_WRAPPER_H
73 #endif // VECTOR_WRAPPER
79 class Vector_2 :
public R_::Vector_2_base
83 typedef typename R::RT
RT;
84 typedef typename R::FT
FT;
90 (
const CGAL::Point_2<R> &p);
111 {
return !(*
this ==
v); }
119 {
return !(*
this ==
v); }
123 {
return RVector_2::hx(); }
127 {
return RVector_2::hy(); }
131 {
return RVector_2::hw(); }
140 {
return RVector_2::homogeneous(i); }
144 {
return RVector_2::cartesian(i); }
170 #ifndef VECTOR_WRAPPER
173 {
return c * (
const RVector_2&)(*
this); }
177 {
return (q.numerator() * (
const RVector_2&)(*
this)) / q.denominator(); }
181 {
return (q.denominator() * (
const RVector_2&)(*
this)) / q.numerator(); }
182 #endif // VECTOR_WRAPPER
186 {
return (
const RVector_2&)(*this) / c; }
190 {
return RVector_2::direction(); }
194 {
return RVector_2::perpendicular(o); }
198 {
return RVector_2::transform(t); }
210 #ifndef NO_OSTREAM_INSERT_VECTOR_2
213 operator<<(std::ostream &os, const Vector_2<R> &
v)
215 typedef typename R::Vector_2_base RVector_2;
216 return os << (
const RVector_2&)
v;
218 #endif // NO_OSTREAM_INSERT_VECTOR_2
220 #ifndef NO_ISTREAM_EXTRACT_VECTOR_2
225 typedef typename R::Vector_2_base RVector_2;
226 return is >> (RVector_2&)p;
228 #endif // NO_ISTREAM_EXTRACT_VECTOR_2
233 #endif // CGAL_VECTOR_2_H
CGAL::Vector_2< R > operator*(const RT &c) const
CGAL_END_NAMESPACE CGAL_BEGIN_NAMESPACE bool operator==(const Origin &o, const Point_2< R > &p)
CGAL_BEGIN_NAMESPACE Vector_2< R > point_to_vector_conversion(const Point_2< R > &p)
CGAL::Vector_2< R > operator/(const Quotient< RT > &q) const
bool operator!=(const Null_vector &v) const
bool operator==(const Null_vector &v) const
void int int REAL REAL * y
Vector_2(const RT &x, const RT &y)
CGAL::Vector_2< R > operator*(const Quotient< RT > &q) const
CGAL::Vector_2< R > operator/(const RT &c) const
CGAL::Vector_2< R > operator+(const CGAL::Vector_2< R > &w) const
CGAL::Vector_2< R > operator-() const
bool operator==(const CGAL::Vector_2< R > &v) const
friend CGAL_FRIEND_INLINE CGAL::Vector_2< R > CGAL_SCOPE point_to_vector_conversion CGAL_NULL_TMPL_ARGS(const CGAL::Point_2< R > &p)
Vector_2(const CGAL::Vector_2< R > &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
R::Vector_2_base RVector_2
FT operator*(const CGAL::Vector_2< R > &w) const
RT homogeneous(int i) const
FT operator[](int i) const
Vector_2(const RT &x, const RT &y, const RT &w)
CGAL::Vector_2< R > operator-(const CGAL::Vector_2< R > &w) const
CGAL::Direction_2< R > direction() const
CGAL::Vector_2< R > perpendicular(const Orientation &o) const
CGAL::Vector_2< R > transform(const CGAL::Aff_transformation_2< R > &t) const
bool operator!=(const CGAL::Vector_2< R > &v) const
Vector_2(const RVector_2 &v)
Vector_2(const CGAL::Direction_2< R > &d)
#define CGAL_BEGIN_NAMESPACE
Number_tag number_type_tag(double)
FT cartesian(int i) const
#define CGAL_END_NAMESPACE
Point_2< R > operator-(const Origin &o, const Vector_2< R > &v)
#define CGAL_FRIEND_INLINE
Vector_2(const CGAL::Point_2< R > &p)
Vector_2(const Null_vector &v)