Go to the documentation of this file.
105 const double x = m(0,0)*
data[0] + m(1,0)*
data[1] + m(2,0)*
data[2];
106 const double y = m(0,1)*
data[0] + m(1,1)*
data[1] + m(2,1)*
data[2];
107 const double z = m(0,2)*
data[0] + m(1,2)*
data[1] + m(2,2)*
data[2];
156 const double phi = axis.
norm();
159 const Vec3 r = *
this - axisPt;
160 const Vec3 n = axis/phi;
161 const double cosPhi = cos(phi);
162 const Vec3 rotatedR =
163 r*cosPhi + n*((
dot(n, r))*(1-cosPhi)) +
cross(r, n)*sin(phi);
164 return rotatedR + axisPt;
227 return (*
this)/
norm();
253 if(n==0)
throw VecErr(
"norm() of data[2]ero-vector");
287 double x=(V1.
X() > V2.
X()) ? V1.
X() : V2.
X();
288 double y=(V1.
Y() > V2.
Y()) ? V1.
Y() : V2.
Y();
289 double z=(V1.
Z() > V2.
Z()) ? V1.
Z() : V2.
Z();
296 double x=(V1.
X() < V2.
X()) ? V1.
X() : V2.
X();
297 double y=(V1.
Y() < V2.
Y()) ? V1.
Y() : V2.
Y();
298 double z=(V1.
Z() < V2.
Z()) ? V1.
Z() : V2.
Z();
307 const char delimiter =
' ';
309 << V.
data[0] << delimiter
310 << V.
data[1] << delimiter
VEC3_INLINE double max() const
Definition: vec3.hpp:258
VEC3_INLINE Vec3 & operator-=(const Vec3 &)
Definition: vec3.hpp:72
VEC3_INLINE Vec3()
The zero vector.
Definition: vec3.hpp:26
VEC3_INLINE Vec3 & operator+=(const Vec3 &)
Definition: vec3.hpp:80
VEC3_INLINE Vec3 operator*(double f, const Vec3 &rhs)
Definition: vec3.hpp:203
double data[3]
Definition: vec3.h:49
VEC3_INLINE double dot(const Vec3 &v1, const Vec3 &v2)
Definition: vec3.hpp:196
VEC3_INLINE bool operator!=(const Vec3 &) const
Definition: vec3.hpp:278
VEC3_INLINE Vec3 unit() const
Definition: vec3.hpp:225
VEC3_INLINE std::istream & operator>>(std::istream &istr, Vec3 &V)
Definition: vec3.hpp:316
VEC3_INLINE friend Vec3 cross(const Vec3 &, const Vec3 &)
Definition: vec3.hpp:187
VEC3_INLINE friend double dot(const Vec3 &, const Vec3 &)
Definition: vec3.hpp:196
VEC3_INLINE Vec3 operator-() const
Definition: vec3.hpp:98
VEC3_INLINE Vec3 cross(const Vec3 &lhs, const Vec3 &rhs)
Definition: vec3.hpp:187
VEC3_INLINE double norm() const
Definition: vec3.hpp:211
VEC3_INLINE Vec3 cmax(const Vec3 &v1, const Vec3 &v2)
Definition: vec3.hpp:231
VEC3_INLINE double & X()
Definition: vec3.h:119
VEC3_INLINE std::ostream & operator<<(std::ostream &ostr, const Vec3 &V)
Definition: vec3.hpp:305
VEC3_INLINE bool operator==(const Vec3 &) const
Definition: vec3.hpp:273
VEC3_INLINE double & Z()
Definition: vec3.h:121
VEC3_INLINE Vec3 rotate(const Vec3 &axis, const Vec3 &axisPt) const
Definition: vec3.hpp:154
VEC3_INLINE Vec3 comp_max(const Vec3 &V1, const Vec3 &V2)
per component maximum
Definition: vec3.hpp:285
VEC3_INLINE Vec3 comp_min(const Vec3 &V1, const Vec3 &V2)
per component minimum
Definition: vec3.hpp:294
#define VEC3_INLINE
Definition: vec3.h:19
VEC3_INLINE double & Y()
Definition: vec3.h:120
VEC3_INLINE Vec3 & operator/=(double)
Definition: vec3.hpp:130
VEC3_INLINE double min() const
Definition: vec3.hpp:266
VEC3_INLINE Vec3 & operator=(const Vec3 &)
Definition: vec3.hpp:56
VEC3_INLINE Vec3 cmin(const Vec3 &v1, const Vec3 &v2)
Definition: vec3.hpp:240
VEC3_INLINE Vec3 operator+(const Vec3 &) const
Definition: vec3.hpp:88
3x3 Matrix
Definition: Matrix3.h:48
VEC3_INLINE double norm2() const
Definition: vec3.hpp:218
string message
Definition: Error.h:24
VecErr(const string &)
Definition: vec3.hpp:20
VEC3_INLINE Vec3 unit_s() const
Definition: vec3.hpp:250
VEC3_INLINE Vec3 operator*(const Matrix3 &m) const
Definition: vec3.hpp:103
VEC3_INLINE Vec3 operator/(double) const
Definition: vec3.hpp:139
VEC3_INLINE Vec3 & operator*=(double)
Definition: vec3.hpp:122