Showing the changes to libraries/physics/src/ObjectActionSpring.cpp (1 of 15 files). Show all
Unified · Split
| @@ -9,6 +9,8 @@ · 8 unmodified lines | |||
| 9 | // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html | 9 | // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html |
| 10 | // | 10 | // |
| 11 | 11 | ||
| 12 | #include "QVariantGLM.h" | ||
| 13 | |||
| 12 | #include "ObjectActionSpring.h" | 14 | #include "ObjectActionSpring.h" |
| 13 | 15 | ||
| 14 | const uint16_t ObjectActionSpring::springVersion = 1; | 16 | const uint16_t ObjectActionSpring::springVersion = 1; |
| @@ -150,6 +152,24 @@ bool ObjectActionSpring::updateArguments(QVariantMap arguments) { · 135 unmodified lines | |||
| 150 | return true; | 152 | return true; |
| 151 | } | 153 | } |
| 152 | 154 | ||
| 155 | QVariantMap ObjectActionSpring::getArguments() { | ||
| 156 | QVariantMap arguments; | ||
| 157 | lockForRead(); | ||
| 158 | |||
| 159 | if (_positionalTargetSet) { | ||
| 160 | arguments["linearTimeScale"] = _linearTimeScale; | ||
| 161 | arguments["targetPosition"] = glmToQMap(_positionalTarget); | ||
| 162 | } | ||
| 163 | |||
| 164 | if (_rotationalTargetSet) { | ||
| 165 | arguments["targetRotation"] = glmToQMap(_rotationalTarget); | ||
| 166 | arguments["angularTimeScale"] = _angularTimeScale; | ||
| 167 | } | ||
| 168 | |||
| 169 | unlock(); | ||
| 170 | return arguments; | ||
| 171 | } | ||
| 172 | |||
| 153 | QByteArray ObjectActionSpring::serialize() { | 173 | QByteArray ObjectActionSpring::serialize() { |
| 154 | QByteArray ba; | 174 | QByteArray ba; |
| 155 | QDataStream dataStream(&ba, QIODevice::WriteOnly); | 175 | QDataStream dataStream(&ba, QIODevice::WriteOnly); |