| 139 | } |
| 140 | |
| 141 | bool AnimatedVertexCache::animate(RenderContext* pRenderContext, double time) |
| 142 | { |
| 143 | if (!hasAnimations()) return false; |
| 144 | |
| 145 | if (!mCachedCurves.empty()) |
| 146 | { |
| 147 | double curveTime = mLoopAnimations ? std::fmod(time, mGlobalCurveAnimationLength) : time; |
| 148 | InterpolationInfo interpolationInfo = calculateInterpolation(curveTime, mCurveKeyframeTimes, mPreInfinityBehavior, Animation::Behavior::Constant); |
| 149 | |
| 150 | if (mCurveLSSCount > 0) |
| 151 | { |
| 152 | executeCurveLSSVertexUpdatePass(pRenderContext, interpolationInfo); |
| 153 | executeCurveLSSAABBUpdatePass(pRenderContext); |
| 154 | } |
| 155 | |
| 156 | if (mCurvePolyTubeCount > 0) |
| 157 | { |
| 158 | executeCurvePolyTubeVertexUpdatePass(pRenderContext, interpolationInfo); |
| 159 | } |
| 160 | |
| 161 | |
| 162 | } |
| 163 | |
| 164 | if (!mCachedMeshes.empty()) |
| 165 | { |
| 166 | executeMeshVertexUpdatePass(pRenderContext, time); |
| 167 | } |
| 168 | |
| 169 | return true; |
| 170 | } |
| 171 | |
| 172 | void AnimatedVertexCache::copyToPrevVertices(RenderContext* pRenderContext) |
| 173 | { |
nothing calls this directly
no test coverage detected