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

Method pushFront

Engine/source/T3D/pathCamera.cpp:373–392  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

371}
372
373void PathCamera::pushFront(CameraSpline::Knot *knot)
374{
375 // Make room at the front
376 if (mNodeCount == NodeWindow)
377 delete mSpline.remove(mSpline.getKnot(mNodeCount));
378 else
379 mNodeCount++;
380 mNodeBase--;
381
382 // Fill in the new node
383 mSpline.push_front(knot);
384 setMaskBits(WindowMask);
385
386 // Make sure the position doesn't fall off
387 if (mPosition > F32(mNodeBase + (NodeWindow - 1)))
388 {
389 mPosition = F32(mNodeBase + (NodeWindow - 1));
390 setMaskBits(PositionMask);
391 }
392}
393
394void PathCamera::popFront()
395{

Callers 1

pathCamera.cppFile · 0.45

Calls 3

getKnotMethod · 0.80
removeMethod · 0.45
push_frontMethod · 0.45

Tested by

no test coverage detected