Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2012-02-25 16:56:25 +0000
committerStijn Buys <ingar@osirion.org>2012-02-25 16:56:25 +0000
commite10c0a7602c612993e6b99348bab507b7def0881 (patch)
tree2d863e946024fc3560221bedcddb149b253b4918 /src/entityproperties.h
parent01f671303b75f3e4c683e3ff47b7ee120f0cda12 (diff)
Add entity manipulator widget, added support for editing entity angles.
Diffstat (limited to 'src/entityproperties.h')
-rw-r--r--src/entityproperties.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/src/entityproperties.h b/src/entityproperties.h
index b80a82e..9a276cb 100644
--- a/src/entityproperties.h
+++ b/src/entityproperties.h
@@ -44,6 +44,20 @@ public:
}
/**
+ * @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
* */
inline const QString & subsections() const {
@@ -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