| 2099 | } |
| 2100 | |
| 2101 | Point3F 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 | |
| 2125 | VectorF VPath::getLinearPathOrientation( VPathNode *pSourceNode, VPathNode *pDestinationNode, const F32 &pTimeInterp, const bool &pForward ) |
| 2126 | { |
nothing calls this directly
no test coverage detected