From e10c0a7602c612993e6b99348bab507b7def0881 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sat, 25 Feb 2012 16:56:25 +0000 Subject: Add entity manipulator widget, added support for editing entity angles. --- src/entityproperties.h | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) (limited to 'src/entityproperties.h') diff --git a/src/entityproperties.h b/src/entityproperties.h index b80a82e..9a276cb 100644 --- a/src/entityproperties.h +++ b/src/entityproperties.h @@ -43,6 +43,20 @@ public: return properties_radius; } + /** + * @brief returns the angles of this object + * */ + inline const Vector3f &angles() const { + return properties_angles; + } + + /** + * @brief returns the yaw angle of this object + * */ + inline const float yaw() const { + return properties_angles[0]; + } + /** * @brief returns the subsections string of this object * */ @@ -83,11 +97,48 @@ public: properties_radius = radius; } + /** + * @brief set the object angles + * */ + inline void set_angles(const Vector3f &angles) { + properties_angles.assign(angles); + } + + /** + * @brief set the object yaw angle + * */ + inline void set_yaw(const float yaw) { + properties_angles[0] = yaw; + } + + /** + * @brief set the object pitch angle + * */ + inline void set_pitch(const float pitch) { + properties_angles[1] = pitch; + } + + /** + * @brief set the object roll angle + * */ + inline void set_roll (const float roll ) { + properties_angles[2] = roll ; + } + + /** + * @brief set the object angles + * */ + inline void set_angles(const float yaw, const float pitch, const float roll) { + properties_angles.assign(yaw, pitch, roll); + } + private: float properties_radius; QString properties_subsections; QString properties_type; + + Vector3f properties_angles; }; } // namespace editor -- cgit v1.2.3