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

Method animateGround

Engine/source/ts/tsAnimate.cpp:955–986  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

953}
954
955void TSShapeInstance::animateGround()
956{
957 mGroundTransform.identity();
958
959 // pick thread which controlls ground transform
960 // if we haven't already...
961 if (!mGroundThread && !initGround())
962 return;
963
964 S32 & loop = mGroundThread->path.loop;
965 F32 & start = mGroundThread->path.start;
966 F32 & end = mGroundThread->path.end;
967
968 // accumulate path transform
969 if (loop>0)
970 {
971 addPath(mGroundThread,start,1.0f);
972 while (--loop)
973 addPath(mGroundThread,0.0f,1.0f);
974 addPath(mGroundThread,0.0f,end);
975 }
976 else if (loop<0)
977 {
978 addPath(mGroundThread,start,0.0f);
979 while (++loop)
980 addPath(mGroundThread,1.0f,0.0f);
981 addPath(mGroundThread,1.0f,end);
982 }
983 else
984 addPath(mGroundThread,start,end);
985 start = end; // in case user tries to animateGround twice
986}
987
988void TSShapeInstance::deltaGround(TSThread * thread, F32 start, F32 end, MatrixF * mat)
989{

Callers 1

getGroundInfoMethod · 0.80

Calls 1

identityMethod · 0.45

Tested by

no test coverage detected