32 Vector3d(
double x,
double y,
double z): x(x), y(y), z(z){};
81 {
return sqrt(pow(x, 2) + pow(y, 2));}
Vector3d(double x, double y, double z)
Contruct a Vector2d from two doubles.
Definition: Vector3d.h:32
Vector3d multiply(const Vector3d &v) const
Multiply two vectors component by component.
Definition: Vector3d.h:73
Vector3d rotatedYZ(double degrees) const
Get the vector rotated over the YZ plane.
Vector3d rotatedXZ(double degrees) const
Get the vector rotated over the XZ plane.
Vector3d()
Default constructor.
Definition: Vector3d.h:25
Vector3d normalized() const
Get the vector normalied.
Definition: Vector3d.h:87
Vector3d(const Vector2d &v, double z)
Implicit cast from Vector2d setting the z component.
Definition: Vector3d.h:48
Vector3d rotatedXY(double degrees) const
Get the vector rotated over the XY plane.
A 3D vector.
Definition: Vector3d.h:14
Definition: Box2DPlugin.h:6
Vector2d xy()
Get the Vector2d formed by the x and y components of the Vector3d.
Definition: Vector3d.h:104
double z
z component of the vector.
Definition: Vector3d.h:19
double y
y component of the vector.
Definition: Vector3d.h:18
Vector3d(const Vector2d &v)
Implicit cast from Vector2d (z = 0).
Definition: Vector3d.h:42
A 2D vector.
Definition: Vector2d.h:14
Vector3d(const Vector3d &v)
Copy constructor.
Definition: Vector3d.h:37
double x
x component of the vector.
Definition: Vector3d.h:17
double module() const
Get the module of the Vector3d.
Definition: Vector3d.h:80