Struct usd::pxr::usd_geom::XformCache
source · #[repr(C, align(8))]pub struct XformCache { /* private fields */ }
Expand description
A caching mechanism for transform matrices. For best performance, this object should be reused for multiple CTM queries.
Instances of this type can be copied, though using Swap() may result in better performance.
It is valid to cache prims from multiple stages in a single XformCache.
WARNING
This class does not automatically invalidate cached values based on changes to the stage from which values were cached. Additionally, a separate instance of this class should be used per-thread, calling the Get* methods from multiple threads is not safe, as they mutate internal state.
Implementations§
source§impl XformCache
impl XformCache
pub fn new(time: TimeCode) -> XformCache
Methods from Deref<Target = XformCacheRef>§
sourcepub fn get_local_to_world_transform(&mut self, prim: &Prim) -> Matrix4d
pub fn get_local_to_world_transform(&mut self, prim: &Prim) -> Matrix4d
Compute the transformation matrix for the given \p prim, including the transform authored on the Prim itself, if present.
Note
This method may mutate internal cache state and is not thread safe.