25 #ifndef CGAL_OPT_SIMPLE_CARTESIAN_VECTOR_3_H
26 #define CGAL_OPT_SIMPLE_CARTESIAN_VECTOR_3_H
41 :
_x(hx/hw),
_y(hy/hw),
_z(hz/hw) {}
53 {
return _x==FT(0) &&
_y==FT(0) &&
_z==FT(0); }
55 {
return _x!=FT(0) ||
_y!=FT(0) ||
_z!=FT(0); }
57 int id()
const {
return (
int)
this; }
59 FT
hx()
const {
return _x; }
60 FT
hy()
const {
return _y; }
61 FT
hz()
const {
return _z; }
62 FT
hw()
const {
return FT(1); }
65 const FT&
x()
const {
return _x; }
66 const FT&
y()
const {
return _y; }
67 const FT&
z()
const {
return _z; }
68 FT&
x() {
return _x; }
69 FT&
y() {
return _y; }
70 FT&
z() {
return _z; }
110 {
_x *= c;
_y *=c;
_z *= c;
return *
this; }
112 {
_x /= c;
_y /=c;
_z /= c;
return *
this; }
124 {
return reinterpret_cast<const Direction&
>(*this); }
131 template <
class FT >
137 template <
class FT >
142 v.
z() * w.
x() - v.
x() * w.
z() ,
143 v.
x() * w.
y() - v.
y() * w.
x() );
146 template <
class FT >
147 std::ostream &operator<<(std::ostream &os, const VectorS3<FT> &
v)
151 return os <<
v.x() <<
' ' <<
v.y() <<
' ' <<
v.z();
158 os <<
"VectorS3(" <<
v.x() <<
", " <<
v.y() <<
", " <<
v.z() <<
")";
163 template <
class FT >
168 is >> v.
x() >> v.
y() >> v.
z();
176 std::cerr <<
"\nStream must be in ascii or binary mode\n";
184 #endif // CGAL_OPT_SIMPLE_CARTESIAN_VECTOR_3_H
Self operator/(const FT &c) const
Self & operator*=(const FT c)
Vector_3< T > operator*(T t, const Vector_3< T > &v)
Self operator+(const Self &v) const
DirectionS3< FT > Direction
FT homogeneous(int i) const
Self transform(const Aff_transformation &t) const
bool operator==(const Null_vector &) const
bool operator==(const Self &v) const
Self operator-(const Self &v) const
VectorS3(const Null_vector &)
VectorS3(const FT &hx, const FT &hy, const FT &hz, const FT &hw)
const FT & operator[](int i) const
*********************************************************************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
Self & operator/=(const FT c)
Self & operator=(const Self &v)
const FT & cartesian(int i) const
VectorS3< FT > cross_product(const VectorS3< FT > &v, const VectorS3< FT > &w)
void write(std::ostream &os, const T &t, const io_Read_write &)
VectorS3(const FT &x, const FT &y, const FT &z)
Aff_transformationS3< FT > Aff_transformation
const Direction & direction() const
Self operator-(const Null_vector &) const
bool operator!=(const Null_vector &) const
Self & operator-=(const Self &v)
Self & operator+=(const Self &v)
const FT & cartesian(int i) const
void read(std::istream &is, T &t, const io_Read_write &)
#define CGAL_BEGIN_NAMESPACE
#define CGAL_END_NAMESPACE
#define CGAL_kernel_precondition(EX)
Self & operator*=(const Self &v)
Self & operator/=(const Self &v)
FT operator*(const Self &v) const