omni::connect::core::defineLinearBasisCurves
Defined in omni/connect/core/CurvesAlgo.h
-
pxr::UsdGeomBasisCurves omni::connect::core::defineLinearBasisCurves(pxr::UsdStagePtr stage, const pxr::SdfPath &path, const pxr::VtIntArray &curveVertexCounts, const pxr::VtVec3fArray &points, const pxr::TfToken &wrap = pxr::UsdGeomTokens->nonperiodic, carb::cpp::optional<const FloatPrimvarData> widths = carb::cpp::nullopt, carb::cpp::optional<const Vec3fPrimvarData> normals = carb::cpp::nullopt, carb::cpp::optional<const Vec3fPrimvarData> displayColor = carb::cpp::nullopt, carb::cpp::optional<const FloatPrimvarData> displayOpacity = carb::cpp::nullopt)
Defines a batched Linear
UsdGeomBasisCurves
prim on the stage.Attribute values will be validated and in the case of invalid data the Curves will not be defined. An invalid
UsdGeomBasisCurves
object will be returned in this case.Values will be authored for all attributes required to completely describe the Curves, even if weaker matching opinions already exist.
Curve Vertex Counts
Points
Type
Wrap
Extent
The “extent” of the Curves will be computed and authored based on the
points
andwidths
provided.The following common primvars can optionally be authored at the same time using a
PrimvarData
to specify interpolation, data, and optionally indices or elementSize.Widths
Normals
Display Color
Display Opacity
For both widths and normals, if they are provided, they are authored as
primvars:widths
andprimvars:normals
, so that indexing is possible and to ensure that the value takes precedence in cases where both the non-primvar and primvar attributes are authored.- Parameters
stage – The stage on which to define the curves.
path – The absolute prim path at which to define the curves.
curveVertexCounts – The number of vertices in each independent curve. The length of this array determines the number of curves.
points – Vertex/CV positions for the curves described in local space.
wrap – Determines how the start and end points of the curve behave. Accepted values for linear curves are
UsdGeomTokens->nonperiodic
andUsdGeomTokens->periodic
.widths – Values for the width specification for the curves.
normals – Values for the normals primvar for the curves. If authored, the curves are considered oriented ribbons rather than tubes.
displayColor – Values to be authored for the display color primvar.
displayOpacity – Values to be authored for the display opacity primvar.
- Returns
UsdGeomBasisCurves
schema wrapping the definedUsdPrim