defineRectLight#

Fully qualified name: usdex::core::defineRectLight

pxr::UsdLuxRectLight usdex::core::defineRectLight(
pxr::UsdStagePtr stage,
const pxr::SdfPath &path,
float width,
float height,
float intensity = 1.0f,
std::optional<std::string_view> texturePath = std::nullopt,
)#

Creates a rectangular (rect) light with an optional texture.

A rect light represents light emitted from one side of a rectangle.

Parameters:
  • stage – The stage in which the rectangular light should be authored

  • path – The path which the rectangular light prim should be written to

  • width – The width of the rectangular light, in the local X axis.

  • height – The height of the rectangular light, in the local Y axis.

  • intensity – The intensity value of the rectangular light.

  • texturePath – The path to the texture file to use on the rectangular light.

Returns:

The light if created successfully.