32 (
double x,
double y,
double z,
double vx,
double vy,
double vz):
33 V(x, y, z),
R(vx, vy, vz), is_identity(false)
38 V(
vec),
R(rot), is_identity(false)
43 return (
V == rhs.
V) && (
R == rhs.
R);
48 return (
V != rhs.
V) || (
R != rhs.
R);
53 double &vx,
double &vy,
double &vz)
const {
98 return result.
dotBy(rhs);
112 return result.
dotBy(rhs);
Displacement and rotation in space.
static Euclid3D ZRotation(double angle)
Make rotation.
void setZ(double z)
Set displacement.
void setX(double x)
Set displacement.
bool isPureXRotation() const
Test for rotation.
void setY(double y)
Set displacement.
void getAll(double &x, double &y, double &z, double &vx, double &vy, double &vz) const
Unpack.
static Euclid3D YRotation(double angle)
Make rotation.
bool operator==(const Euclid3D &) const
Euclid3D()
Default constructor.
void setDisplacement(const Vector3D &V)
Set displacement.
bool operator!=(const Euclid3D &) const
const Euclid3D & operator*=(const Euclid3D &rhs)
Dot product with assign.
static Euclid3D XRotation(double angle)
Make rotation.
const Euclid3D & dotBy(const Euclid3D &rhs)
Dot product with assign.
const Vector3D & getVector() const
Get displacement.
bool isPureYRotation() const
Test for rotation.
Euclid3D inverse() const
Inverse.
void setRotation(const Rotation3D &R)
Set rotation.
static Euclid3D identity()
Make identity.
Euclid3D operator*(const Euclid3D &rhs) const
Dot product.
static Euclid3D translation(double x, double y, double z)
Make translation.
bool isPureZRotation() const
Test for rotation.
Euclid3D dot(const Euclid3D &rhs) const
Dot product.
bool isPureTranslation() const
Test for translation.
const Rotation3D & getRotation() const
Get rotation.
Rotation in 3-dimensional space.
static Rotation3D Identity()
Make identity.
bool isIdentity() const
Test for identity.
static Rotation3D ZRotation(double angle)
Make rotation.
static Rotation3D YRotation(double angle)
Make rotation.
Rotation3D inverse() const
Inversion.
bool isPureXRotation() const
Test for rotation.
Vector3D getAxis() const
Get axis vector.
bool isPureZRotation() const
Test for rotation.
static Rotation3D XRotation(double angle)
Make rotation.
bool isPureYRotation() const
Test for rotation.
void setY(double)
Set component.
void setX(double)
Set component.
void setZ(double)
Set component.
void getComponents(double &x, double &y, double &z) const
Get components.
bool isZero() const
Test for zero.