38 RotationProperty::RotationProperty(
Property* parent,
40 const Eigen::Quaterniond& value,
41 const char* changed_slot,
45 "Orientation specification using Euler angles or a quaternion.",
49 , ignore_quaternion_property_updates_(false)
50 , show_euler_string_(true) {
54 Ogre::Quaternion(value.w(), value.x(), value.y(), value.z()),
55 "order: x, y, z, w",
this);
71 Eigen::Quaterniond qn = q.normalized();
95 Eigen::Quaternion<Ogre::Real> eigen_q(q.w, q.x, q.y, q.z);
123 const QRegExp quatSpec(
"\\s*(quat:)?([^;]+;){3}");
124 QString
s = value.toString();
125 if (quatSpec.indexIn(s) != -1) {
126 s = s.mid(quatSpec.cap(1).length());
virtual Ogre::Quaternion getQuaternion() const
Eigen::Quaterniond getQuaternion() const
void setReadOnly(bool read_only) override
Overridden from Property to propagate read-only-ness to children.
void setEulerAngles(double euler[3], bool normalize)
virtual void setReadOnly(bool read_only)
virtual bool setValue(const QVariant &new_value)
void save(Config config) const override
void load(const Config &config) override
Load the value of this property and/or its children from the given Config node.
bool setValue(const QVariant &value) override
void setQuaternion(const Eigen::Quaterniond &q)
void setEulerAxes(const QString &axes_spec)
virtual bool setQuaternion(const Ogre::Quaternion &quaternion)
TFSIMD_FORCE_INLINE Vector3 & normalize()
virtual QVariant getValue() const