| 246 | } |
| 247 | |
| 248 | void TSShapeInstance::handleDefaultScale(S32 a, S32 b, TSIntegerSet & scaleBeenSet) |
| 249 | { |
| 250 | // set default scale values (i.e., identity) and do any initialization |
| 251 | // relating to animated scale (since scale normally not animated) |
| 252 | |
| 253 | smScaleThreads.setSize(mShape->nodes.size()); |
| 254 | scaleBeenSet.takeAway(mCallbackNodes); |
| 255 | scaleBeenSet.takeAway(mHandsOffNodes); |
| 256 | if (animatesUniformScale()) |
| 257 | { |
| 258 | smNodeCurrentUniformScales.setSize(mShape->nodes.size()); |
| 259 | for (S32 i=a; i<b; i++) |
| 260 | if (scaleBeenSet.test(i)) |
| 261 | { |
| 262 | smNodeCurrentUniformScales[i] = 1.0f; |
| 263 | smScaleThreads[i] = NULL; |
| 264 | } |
| 265 | } |
| 266 | else if (animatesAlignedScale()) |
| 267 | { |
| 268 | smNodeCurrentAlignedScales.setSize(mShape->nodes.size()); |
| 269 | for (S32 i=a; i<b; i++) |
| 270 | if (scaleBeenSet.test(i)) |
| 271 | { |
| 272 | smNodeCurrentAlignedScales[i].set(1.0f,1.0f,1.0f); |
| 273 | smScaleThreads[i] = NULL; |
| 274 | } |
| 275 | } |
| 276 | else |
| 277 | { |
| 278 | smNodeCurrentArbitraryScales.setSize(mShape->nodes.size()); |
| 279 | for (S32 i=a; i<b; i++) |
| 280 | if (scaleBeenSet.test(i)) |
| 281 | { |
| 282 | smNodeCurrentArbitraryScales[i].identity(); |
| 283 | smScaleThreads[i] = NULL; |
| 284 | } |
| 285 | } |
| 286 | |
| 287 | scaleBeenSet.overlap(mHandsOffNodes); |
| 288 | scaleBeenSet.overlap(mCallbackNodes); |
| 289 | } |
| 290 | |
| 291 | void TSShapeInstance::updateTransitionNodeTransforms(TSIntegerSet& transitionNodes) |
| 292 | { |