MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / handleDefaultScale

Method handleDefaultScale

Engine/source/ts/tsAnimate.cpp:248–289  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

246}
247
248void 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
291void TSShapeInstance::updateTransitionNodeTransforms(TSIntegerSet& transitionNodes)
292{

Callers

nothing calls this directly

Calls 7

takeAwayMethod · 0.80
setSizeMethod · 0.45
sizeMethod · 0.45
testMethod · 0.45
setMethod · 0.45
identityMethod · 0.45
overlapMethod · 0.45

Tested by

no test coverage detected