| 293 | } |
| 294 | |
| 295 | bool 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 | |
| 331 | void VDBObject::hash( IECore::MurmurHash &h ) const |
| 332 | { |