32 Vector3(
const double x_,
const double y_,
const double z_);
54 void set(
const double x_,
const double y_,
const double z_);
86 inline std::ostream &operator<<(std::ostream &stream,
const Vector3& vec)
88 stream <<
"Vector3: "<<vec.
x()<<
", "<<vec.
y()<<
", "<<vec.
z();
97 double x=vec0.
y() * vec1.
z() - vec0.
z() * vec1.
y();
98 double y=vec0.
z() * vec1.
x() - vec0.
x() * vec1.
z();
99 double z=vec0.
x() * vec1.
y() - vec0.
y() * vec1.
x();
109 double len(other.
length());
112 return Vector3(other.
x()/len,other.
y()/len,other.
z()/len);
116 std::cout<<
"warning: normalize(const Vector3& other), Null length vector!"<<std::endl;
130 return Vector3(d*vec.
x(),d*vec.
y(),d*vec.
z());
double y() const
Get the y-value.
double operator*(const Vector3 &other) const
Scalar product.
double length() const
Get the length of the vector.
double x() const
Get the x-value.
Vector3 operator/(double val) const
Divide by a scalar value.
3D Vector
Definition: Vector3.h:26
Vector3()
Constructor The vector is initialized to (0,0,0)
double z() const
Get the z-value.