defineCube#

Fully qualified name: usdex::core::defineCube

pxr::UsdGeomCube usdex::core::defineCube(
pxr::UsdStagePtr stage,
const pxr::SdfPath &path,
const double size = 2.0,
const std::optional<pxr::GfVec3f> displayColor = std::nullopt,
const std::optional<float> displayOpacity = std::nullopt,
)#

Defines a cube primitive.

Defines a cube of the specified size at the origin.

Note

In order to define a rectangular prism, first call defineCube and then adjust relative scale of each axis using usdex::core::setLocalTransform.

Parameters:
  • stage – The stage on which to define the cube

  • path – The absolute prim path at which to define the cube

  • size – The size of the cube

  • displayColor – Values to be authored for the display color

  • displayOpacity – Values to be authored for the display opacity

Returns:

UsdGeomCube schema wrapping the defined UsdPrim