39 RotationProperty::RotationProperty(
Property* parent,
const QString& name,
40 const Eigen::Quaterniond& value,
41 const char *changed_slot,
44 "Orientation specification using Euler angles or a quaternion.",
45 parent, changed_slot, receiver)
46 , ignore_quaternion_property_updates_(false)
47 , show_euler_string_(true)
51 Ogre::Quaternion(value.w(), value.x(), value.y(), value.z()),
52 "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);
98 if (eigen_q.isApprox(
getQuaternion().cast<Ogre::Real>()))
return;
126 const QRegExp quatSpec(
"\\s*(quat:)?([^;]+;){3}");
127 QString
s = value.toString();
128 if (quatSpec.indexIn(s) != -1)
130 s = s.mid(quatSpec.cap(1).length());
virtual Ogre::Quaternion getQuaternion() const
virtual bool setValue(const QVariant &value)
Eigen::Quaterniond getQuaternion() const
virtual void setReadOnly(bool read_only)
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 setQuaternion(const Eigen::Quaterniond &q)
void setEulerAxes(const QString &axes_spec)
virtual bool setQuaternion(const Ogre::Quaternion &quaternion)
TFSIMD_FORCE_INLINE Vector3 & normalize()
virtual void save(Config config) const
virtual void load(const Config &config)
Load the value of this property and/or its children from the given Config node.
virtual QVariant getValue() const