omni::connect::core::definePointCloud

Defined in omni/connect/core/PointsAlgo.h

pxr::UsdGeomPoints omni::connect::core::definePointCloud(pxr::UsdStagePtr stage, const pxr::SdfPath &path, const pxr::VtVec3fArray &points, carb::cpp::optional<const pxr::VtInt64Array> ids = carb::cpp::nullopt, 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 UsdGeomPoints prim on the stage.

Attribute values will be validated and in the case of invalid data the Points will not be defined. An invalid UsdGeomPoints object will be returned in this case.

Values will be authored for all attributes required to completely describe the Points, even if weaker matching opinions already exist.

  • Point Count

  • Points

  • Extent

The “extent” of the Points will be computed and authored based on the points and widths 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.

  • Ids

  • Widths

  • Normals

  • Display Color

  • Display Opacity

For both widths and normals, if they are provided, they are authored as primvars:widths and primvars: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 points.

  • path – The absolute prim path at which to define the points.

  • points – Vertex positions for the points described in local space.

  • ids – Values for the id specification for the points.

  • widths – Values for the width specification for the points.

  • normals – Values for the normals primvar for the points. Only Vertex normals are considered valid.

  • displayColor – Values to be authored for the display color primvar.

  • displayOpacity – Values to be authored for the display opacity primvar.

Returns

UsdGeomPoints schema wrapping the defined UsdPrim