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

Method pushFront

Engine/source/T3D/pathCamera.cpp:371–390  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 2

pathCamera.cppFile · 0.45
addFXMethod · 0.45

Calls 3

getKnotMethod · 0.80
removeMethod · 0.45
push_frontMethod · 0.45

Tested by

no test coverage detected