MCPcopy Create free account
hub / github.com/ImageEngine/cortex / linearObjectInterpolation

Function linearObjectInterpolation

src/IECore/ObjectInterpolator.cpp:176–197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174{
175
176ObjectPtr linearObjectInterpolation( const Object *y0, const Object *y1, double x )
177{
178 if( y0->typeId() != y1->typeId() )
179 {
180 throw( Exception( "Object types don't match" ) );
181 }
182
183 const Registry &r = registry();
184
185 TypeId typeId = y0->typeId();
186 while( typeId != InvalidTypeId )
187 {
188 Registry::const_iterator it = r.find( typeId );
189 if( it != r.end() )
190 {
191 return it->second( y0, y1, x );
192 }
193 typeId = RunTimeTyped::baseTypeId( typeId );
194 }
195
196 return nullptr;
197}
198
199void registerInterpolator( IECore::TypeId objectType, ObjectInterpolator interpolator )
200{

Callers 9

interpolatePrimitiveFunction · 0.85
interpolateCameraFunction · 0.85
readTransformMethod · 0.85
readAttributeMethod · 0.85
readObjectMethod · 0.85
interpolateCompoundDataFunction · 0.85

Calls 3

typeIdMethod · 0.80
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected