Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Replace boost hash usage with TfHash in pxr/base/gf #2289

Merged
merged 1 commit into from
Mar 2, 2023

Conversation

nvmkuruc
Copy link
Collaborator

Description of Change(s)

This is a reconstruction #2175 which didn't get successfully merged.

Requires: #2173
To remove the dependency of pxr/base/gf on boost's hashing functions

  • Copy constructor for python bindings added when missing to support test coverage (Gf.Rotation, Gf.Quaternion, Gf.Interval)
  • __hash__ operator overloads are added when missing to support test coverage (Gf.BBox3d, Gf.Frustum, Gf.Quat{f,h,d}, Gf.Rect2i, Gf.Rotation)
  • __hash__ test coverage added to testGfRotation, testGfVec, testGfRect2i, testGfRange, testGfQuarternion, testGfMatrix, testGfInterval, testGfFrustum, testGfDualQuaternion, testGfBBox3d, and testGfFrustum.
  • Replaced boost::hash_combine with TfHash::Combine in hash_value implementations. Preserving hash_value allows boost::hash to still work with these types without the explicit dependency. TfHash will use these hash_value implementations when no TfHashAppend overload has been provided.

Fixes Issue(s)

-#2172 (more PRs forthcoming)

  • I have verified that all unit tests pass with the proposed changes
  • I have submitted a signed Contributor License Agreement

@sunyab
Copy link
Contributor

sunyab commented Feb 17, 2023

Filed as internal issue #USD-8026

pixar-oss added a commit that referenced this pull request Mar 2, 2023
Replace boost hash usage with TfHash in pxr/base/gf

(Internal change: 2263848)
@pixar-oss pixar-oss merged commit 808630e into PixarAnimationStudios:dev Mar 2, 2023
@nvmkuruc nvmkuruc deleted the gfhash branch March 2, 2023 19:40
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants