23 double internal_data[4];
27 Quaternion(
double x,
double y,
double z,
double w);
29 const double*
data()
const;
39 std::string
toString(
int precision = -1,
int width = -1)
const;
contains the definition of a Matrix type
contains the definition of a Vector type
void fromRotationMatrix(const yarp::sig::Matrix &R)
Converts a rotation matrix to a quaternion.
double abs()
Computes the modulus of the quaternion.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
yarp::sig::Vector toVector() const
Converts the quaternion to a vector of length 4.
yarp::sig::Matrix toRotationMatrix3x3() const
Converts a quaternion to a rotation matrix.
Quaternion inverse() const
Computes the inverse of the quaternion.
std::string toString(int precision=-1, int width=-1) const
void normalize()
Normalizes the quaternion elements.
void fromAxisAngle(const yarp::sig::Vector &v)
Computes the quaternion from an axis-angle representation.
double arg()
Computes the argument or phase of the quaternion in radians.
yarp::os::Type getType() const override
yarp::sig::Matrix toRotationMatrix4x4() const
Converts a quaternion to a rotation matrix.
yarp::sig::Vector toAxisAngle()
bool isValid() const
Check if the quaternion is valid.
bool write(yarp::os::ConnectionWriter &connection) const override
Write vector to a connection.
An interface for reading from a network connection.
An interface for writing to a network connection.
This is a base class for objects that can be both read from and be written to the YARP network.
static Type byName(const char *name)
The main, catch-all namespace for YARP.