definePhysicsMaterial#

Fully qualified name: usdex::core::definePhysicsMaterial

pxr::UsdShadeMaterial usdex::core::definePhysicsMaterial(
pxr::UsdPrim prim,
const float dynamicFriction,
const std::optional<float> staticFriction = std::nullopt,
const std::optional<float> restitution = std::nullopt,
const std::optional<float> density = std::nullopt,
)#

Creates a Physics Material.

This is an overloaded member function, provided for convenience. It differs from the above function only in what arguments it accepts.

Parameters:
  • prim – Prim to define the material. The prim’s type will be set to UsdShadeMaterial.

  • dynamicFriction – The dynamic friction of the material

  • staticFriction – The static friction of the material

  • restitution – The restitution of the material

  • density – The density of the material

Returns:

UsdShadeMaterial schema wrapping the defined UsdPrim