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

Method isEqualTo

src/IECoreVDB/VDBObject.cpp:295–329  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

293}
294
295bool VDBObject::isEqualTo( const IECore::Object *other ) const
296{
297 if( !IECoreScene::VisibleRenderable::isEqualTo( other ) )
298 {
299 return false;
300 }
301
302 const VDBObject *vdbObject = runTimeCast<const VDBObject>( other );
303
304 if( !vdbObject )
305 {
306 return false;
307 }
308
309 if (m_grids.size() != vdbObject->m_grids.size())
310 {
311 return false;
312 }
313
314 for (const auto& it : m_grids)
315 {
316 const auto itOther = vdbObject->m_grids.find( it.first );
317 if ( itOther == vdbObject->m_grids.end() )
318 {
319 return false;
320 }
321
322 if (itOther->second.hash() != it.second.hash())
323 {
324 return false;
325 }
326 }
327
328 return true;
329}
330
331void VDBObject::hash( IECore::MurmurHash &h ) const
332{

Callers

nothing calls this directly

Calls 4

sizeMethod · 0.45
findMethod · 0.45
endMethod · 0.45
hashMethod · 0.45

Tested by

no test coverage detected