Skip to content

Latest commit

 

History

History
 
 

world_bounding_box

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Quick Reference

C++

auto bounds = pxr::UsdGeomImageable(sphere).ComputeWorldBound(
    pxr::UsdTimeCode(1),
    pxr::TfToken("default")
);
std::cout << bounds << std::endl;

auto cache = pxr::UsdGeomBBoxCache(
    pxr::UsdTimeCode().Default(),
    pxr::UsdGeomImageable::GetOrderedPurposeTokens()
);

std::cout << cache.ComputeWorldBound(sphere.GetPrim()) << std::endl;

Python

# Method #1: Compute at a certain time
print(UsdGeom.Imageable(sphere).ComputeWorldBound(
    Usd.TimeCode(1),
    purpose1='default',
))

# Method #2: Compute using a cache
cache = UsdGeom.BBoxCache(Usd.TimeCode.Default(), ['default', 'render'])
print(cache.ComputeWorldBound(sphere.GetPrim()))