I can't find anything in stateutils to assist with this, so I am rolling my own, and am having issues getting GfRay to work as expected.
- I have constructed a GfRay passing in two vectors for start/end.
- I have constructed UsdGeomBBoxCache's for the prims on the stage.
- I am calling the GfRay's Intersect method, and passing in a GfRange3d, as the signature does not support a UsdGeomBBoxCache. I am calling ComputeAlignedBox on the UsdGeomBBoxCache's to get the GfRange3d.
The intersection seems to return true no matter where I position my start/end vectors.
hip file attached to demonstrate what I am trying to achieve outside of the state.
Cheers,
Aaron.