MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / animate

Method animate

Source/Falcor/Scene/Animation/AnimatedVertexCache.cpp:141–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 4

hasAnimationsFunction · 0.85
calculateInterpolationFunction · 0.85
fmodFunction · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected