30#ifndef ROBODK_JOINTS_H
31#define ROBODK_JOINTS_H
37#error "This class cannot yet be used without the Qt Framework"
58 explicit Joints(
int ndofs);
63 Joints(
const double* joints,
int ndofs = 0);
68 Joints(
const float* joints,
int ndofs = 0);
84 Joints(
const QString& str);
96#ifdef ROBODK_API_FLOATS
99 const float*
Values()
const;
103 const double*
Values()
const;
107 double Compare(
const Joints &other)
const;
133 void SetValues(
const double *joints,
int ndofs = -1);
138 void SetValues(
const float *joints,
int ndofs = -1);
142 inline operator QString()
const {
return ToString(); }
149 const QString& separator = QLatin1String(
", "),
150 int precision = 3)
const;
155 bool FromString(
const QString& str);
159 static constexpr int MaximumJoints = 12;
The Joints class represents a joint position of a robot (robot axes).
int GetValues(double *joints)
GetValues.
float _jointsFloat[MaximumJoints]
joint values (floats, used to return a copy as a float pointer)
int Length() const
Number of joint axes of the robot (or degrees of freedom)
double _joints[MaximumJoints]
joint values (doubles, used to store the joint values)
const double * Values() const
Joint values.
bool Valid()
Check if the joints are valid. For example, when we request the Inverse kinematics and there is no so...
Joints(const Joints &joints)=default
Create a copy of an object.
int _dofCount
number of degrees of freedom
const double * ValuesD() const
Joint values.
void setLength(int new_length)
Set the length of the array (only shrinking the array is allowed)
const float * ValuesF() const
Joint values.
void SetValues(const double *joints, int ndofs=-1)
Set the joint values in deg or mm. You can also important provide the number of degrees of freedom (6...
The Matrix2D struct represents a variable size 2D matrix.