51 #ifndef CGAL_VECTOR_3_H
52 #define CGAL_VECTOR_3_H
54 #ifndef CGAL_REP_CLASS_DEFINED
55 #error no representation class defined
56 #endif // CGAL_REP_CLASS_DEFINED
58 #ifndef CGAL_POINT_3_H
60 #endif // CGAL_POINT_3_H
63 #ifndef CGAL_DIRECTION_3_H
65 #endif // CGAL_DIRECTION_3_H
68 #ifndef VECTOR_3_RFT_WRAPPER_H
69 #include <CGAL/Vector_3_rft_wrapper.h>
70 #endif // VECTOR_3_RFT_WRAPPER_H
71 #endif // VECTOR_WRAPPER
77 class Vector_3 :
public R_::Vector_3_base
81 typedef typename R::RT
RT;
82 typedef typename R::FT
FT;
88 (
const CGAL::Point_3<R>& p);
113 {
return !(*
this ==
v); }
117 {
return !(*
this ==
v); }
119 {
return RVector_3::hx(); }
121 {
return RVector_3::hy(); }
123 {
return RVector_3::hz(); }
125 {
return RVector_3::hw(); }
133 {
return RVector_3::homogeneous(i); }
135 {
return RVector_3::cartesian(i); }
140 CGAL::Vector_3<R>
operator+(
const CGAL::Vector_3<R>& w)
const
142 CGAL::Vector_3<R>
operator-(
const CGAL::Vector_3<R>& w)
const
149 #ifndef VECTOR_WRAPPER
151 {
return c * (
const RVector_3& )(*
this) ; }
154 return (q.numerator() * (
const RVector_3& )(*
this)) /
159 return (q.denominator() * (
const RVector_3& )(*
this)) /
162 #endif // VECTOR_WRAPPER
165 {
return (
const RVector_3& )(*this) / c; }
167 {
return RVector_3::direction(); }
168 CGAL::Vector_3<R>
transform(
const CGAL::Aff_transformation_3<R>& t)
const
169 {
return RVector_3::transform(t); }
184 #ifndef NO_OSTREAM_INSERT_VECTOR_3
187 operator<<(std::ostream& os, const Vector_3<R>&
v)
189 typedef typename R::Vector_3_base RVector_3;
190 return os << (
const RVector_3& )
v;
192 #endif // NO_OSTREAM_INSERT_VECTOR_3
194 #ifndef NO_ISTREAM_EXTRACT_VECTOR_3
199 typedef typename R::Vector_3_base RVector_3;
200 return is >> (RVector_3& )p;
202 #endif // NO_ISTREAM_EXTRACT_VECTOR_3
210 typedef typename R::Vector_3_base RVector_3;
211 return cross_product((
const RVector_3& )v,(
const RVector_3& )w);
217 #endif // CGAL_VECTOR_3_H
CGAL::Vector_3< R > operator*(const RT &c) const
Vector_3(const RT &x, const RT &y, const RT &z, const RT &w)
bool operator==(const Null_vector &v) const
CGAL_END_NAMESPACE CGAL_BEGIN_NAMESPACE bool operator==(const Origin &o, const Point_2< R > &p)
Vector_3(const RVector_3 &v)
CGAL_BEGIN_NAMESPACE Vector_2< R > point_to_vector_conversion(const Point_2< R > &p)
R::Vector_3_base RVector_3
void int int REAL REAL * y
RT homogeneous(int i) const
Vector_3(const CGAL::Direction_3< R > &d)
friend CGAL_FRIEND_INLINE CGAL::Vector_3< R > point_to_vector_conversion CGAL_NULL_TMPL_ARGS(const CGAL::Point_3< R > &p)
bool operator==(const CGAL::Vector_3< R > &v) const
FT operator*(const CGAL::Vector_3< R > &w) const
Vector_3(const RT &x, const RT &y, const RT &z)
*********************************************************************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
CGAL::Vector_3< R > transform(const CGAL::Aff_transformation_3< R > &t) const
bool operator!=(const CGAL::Vector_3< R > &v) const
CGAL::Vector_3< R > operator-() const
void int int int REAL REAL REAL * z
FT operator[](int i) const
VectorS3< FT > cross_product(const VectorS3< FT > &v, const VectorS3< FT > &w)
Vector_3(const Null_vector &v)
CGAL::Direction_3< R > direction() const
CGAL::Vector_3< R > operator/(const Quotient< RT > &q) const
FT cartesian(int i) const
Vector_3(const CGAL::Point_3< R > &p)
CGAL::Vector_3< R > operator/(const RT &c) const
Vector_3(const CGAL::Vector_3< R > &v)
#define CGAL_BEGIN_NAMESPACE
Some basic geometric data types.
bool operator!=(const Null_vector &v) const
CGAL::Vector_3< R > operator*(const Quotient< RT > &q) const
CGAL::Vector_3< R > operator-(const CGAL::Vector_3< R > &w) const
Number_tag number_type_tag(double)
#define CGAL_END_NAMESPACE
Point_2< R > operator-(const Origin &o, const Vector_2< R > &v)
#define CGAL_FRIEND_INLINE
CGAL::Vector_3< R > operator+(const CGAL::Vector_3< R > &w) const