forked from PixarAnimationStudios/OpenUSD
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deprecate functions in Gf that take and return GfVec3f values and can
potentially result in loss of precision. We plan to remove these methods altogether in the 24.11 release. The type GfMatrix4d is commonly used in the Pixar pipeline to represent local-to-world matrices. When local space points are represented using the type GfVec3f, calls to functions such as GfMatrix4d::Transform lose precision, due to overloads that take arguments of type GfVec3f and return values of the same type. Production experience has shown us this precision loss can be critical, e.g., due to large translations in local-to-world matrices that require points in world space to be represented with higher precision than is necessary in local space (which is presumably chosen so that the points are sufficiently close to the local origin). In order to avoid this loss of precision, it is currently necessary to explicitly cast a GfVec3f argument to GfVec3d in order to select the overload that computes and returns a double-precision result; it is easy to call the lossy overload by accident. And when lost precision causes observable problems downstream, it can be very difficult and time-consuming to track down the source of the problem. Therefore, we are deprecating functions that are known potential sources of precision loss (marking them as deprecated in the documentation) in the 24.08 release, and we plan to remove these methods in 24.11. Note that the above geometric interpretation doesn't apply to all of the operations we are planning to deprecate, but for consistency, we plan to remove all methods that take and return GfVec3f (or GfVec4f or GfVec2f) on Gf classes that internally store doubles. (Internal change: 2332487)
- Loading branch information
1 parent
bbabd3c
commit 947c971
Showing
6 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters