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

Method getLinearPathPosition

Engine/source/Verve/VPath/VPath.cpp:2101–2123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2099}
2100
2101Point3F VPath::getLinearPathPosition( VPathNode *pSourceNode, VPathNode *pDestinationNode, const F32 &pTimeInterp, const bool &pForward, F32 &pPathInterp )
2102{
2103 // Set path interp to the time interp.
2104 pPathInterp = pTimeInterp;
2105
2106 if ( pTimeInterp <= 0.f )
2107 {
2108 // Source Node.
2109 return pSourceNode->getWorldPosition();
2110 }
2111 else if ( pTimeInterp >= 1.f )
2112 {
2113 // Destination Node.
2114 return pDestinationNode->getWorldPosition();
2115 }
2116
2117 // Calculate Position.
2118 Point3F position;
2119 position.interpolate( pSourceNode->getWorldPosition(), pDestinationNode->getWorldPosition(), pTimeInterp );
2120
2121 // Return.
2122 return position;
2123}
2124
2125VectorF VPath::getLinearPathOrientation( VPathNode *pSourceNode, VPathNode *pDestinationNode, const F32 &pTimeInterp, const bool &pForward )
2126{

Callers

nothing calls this directly

Calls 2

getWorldPositionMethod · 0.45
interpolateMethod · 0.45

Tested by

no test coverage detected