| 674 | } |
| 675 | |
| 676 | void hash( HashType hashType, double time, MurmurHash &h, bool ignoreSceneHash = false ) const |
| 677 | { |
| 678 | size_t s0, s1; |
| 679 | double x; |
| 680 | |
| 681 | h.append( (unsigned char)hashType ); |
| 682 | |
| 683 | // all kinds of hashes, except the child names depend on time. |
| 684 | switch( hashType ) |
| 685 | { |
| 686 | case TransformHash: |
| 687 | |
| 688 | if ( m_indexedIO->hasEntry( transformEntry ) ) |
| 689 | { |
| 690 | x = transformSampleInterval( time, s0, s1 ); |
| 691 | h.append( lerp( (double)s0, (double)s1, x ) ); |
| 692 | } |
| 693 | else |
| 694 | { |
| 695 | // return a simple hash for the identity transform (which does not include the scene location). |
| 696 | return; |
| 697 | } |
| 698 | break; |
| 699 | |
| 700 | case AttributesHash: |
| 701 | { |
| 702 | NameList attrs; |
| 703 | attributeNames( attrs ); |
| 704 | if ( !attrs.size() ) |
| 705 | { |
| 706 | // return a simple hash for no attributes (which does not include the scene location). |
| 707 | return; |
| 708 | } |
| 709 | for ( NameList::const_iterator aIt = attrs.begin(); aIt != attrs.end(); aIt++ ) |
| 710 | { |
| 711 | x = attributeSampleInterval( *aIt, time, s0, s1 ); |
| 712 | h.append( lerp( (double)s0, (double)s1, x ) ); |
| 713 | } |
| 714 | } |
| 715 | break; |
| 716 | |
| 717 | case BoundHash: |
| 718 | |
| 719 | x = boundSampleInterval( time, s0, s1 ); |
| 720 | h.append( lerp( (double)s0, (double)s1, x ) ); |
| 721 | break; |
| 722 | |
| 723 | case ObjectHash: |
| 724 | |
| 725 | if ( m_indexedIO->hasEntry( objectEntry ) ) |
| 726 | { |
| 727 | x = objectSampleInterval( time, s0, s1 ); |
| 728 | h.append( lerp( (double)s0, (double)s1, x ) ); |
| 729 | } |
| 730 | else |
| 731 | { |
| 732 | // return a simple hash for no object (which does not include the scene location). |
| 733 | return; |
nothing calls this directly
no test coverage detected