63 __host__ __device__
inline Vector3R();
65 __host__ __device__
inline Vector3R(
const Vector3R& other);
68 __host__ __device__
inline Vector3R&
operator+=(
const Vector3R& v2);
69 __host__ __device__
inline Vector3R&
operator-=(
const Vector3R& v2);
75 __host__
inline friend std::ostream&
operator<<(std::ostream& s,
77 __host__ __device__
inline GReal_t dot(
const Vector3R& v2);
143 return v1.v[0] * v2.v[0] + v1.v[1] * v2.v[1] + v1.v[2] * v2.v[2];
181 v[0] = v[1] = v[2] = 0.0;
214 GReal_t sp, st, sk, cp, ct, ck;
223 temp[0] = (ck * ct * cp - sk * sp) * v[0] + (-sk * ct * cp - ck * sp) * v[1]
225 temp[1] = (ck * ct * sp + sk * cp) * v[0] + (-sk * ct * sp + ck * cp) * v[1]
227 temp[2] = -ck * st * v[0] + sk * st * v[1] + ct * v[2];
237 s <<
"(" << v.v[0] <<
"," << v.v[1] <<
"," << v.v[2] <<
")";
249 return Vector3R(p1.v[1] * p2.v[2] - p1.v[2] * p2.v[1],
250 p1.v[2] * p2.v[0] - p1.v[0] * p2.v[2],
251 p1.v[0] * p2.v[1] - p1.v[1] * p2.v[0]);
261 temp = v[0] * v[0] + v[1] * v[1] + v[2] * v[2];
272 temp = v[0] * p2.v[0];
273 temp += v[0] * p2.v[0];
274 temp += v[0] * p2.v[0];
__host__ __device__ friend Vector3R operator/(const Vector3R &v1, GReal_t c)
__host__ __device__ friend Vector3R operator+(const Vector3R &v1, const Vector3R &v2)
__host__ __device__ Vector3R & operator+=(const Vector3R &v2)
__host__ __device__ friend Vector3R rotateEuler(const Vector3R &v, GReal_t phi, GReal_t theta, GReal_t ksi)
__host__ __device__ void applyRotateEuler(GReal_t phi, GReal_t theta, GReal_t ksi)
Vector3R operator+(const Vector3R &v1, const Vector3R &v2)
Vector3R rotateEuler(const Vector3R &v, GReal_t alpha, GReal_t beta, GReal_t gamma)
__host__ __device__ void set(GInt_t i, GReal_t d)
__host__ __device__ GReal_t get(GInt_t i) const
__host__ __device__ Vector3R & operator-=(const Vector3R &v2)
__host__ __device__ friend Vector3R operator-(const Vector3R &v1, const Vector3R &v2)
__host__ __device__ Vector3R()
__host__ __device__ GReal_t dot(const Vector3R &v2)
__host__ __device__ GReal_t d3mag() const
Vector3R operator/(const Vector3R &v1, GReal_t c)
__host__ __device__ friend Vector3R cross(const Vector3R &v1, const Vector3R &v2)
Vector3R cross(const Vector3R &p1, const Vector3R &p2)
ostream & operator<<(ostream &s, const Vector3R &v)
double GReal_t
Double 8 bytes or float 4 bytes.
__host__ __device__ friend Vector3R operator*(GReal_t c, const Vector3R &v2)
Vector3R operator-(const Vector3R &v1, const Vector3R &v2)
__host__ friend std::ostream & operator<<(std::ostream &s, const Vector3R &v)
Vector3R operator*(GReal_t c, const Vector3R &v2)
int GInt_t
Signed integer 4 bytes (int)
__host__ __device__ Vector3R & operator*=(const GReal_t c)
__host__ __device__ Vector3R & operator/=(const GReal_t c)