Point Cloud / Particle Prims#
Utility functions to create UsdGeomPoint
prims.
UsdGeomPoints prims are simple point clouds or particle fields. Points generally receive a single shading sample each, which should take normals into account, if present.
Functions#
- pxr::UsdGeomPoints usdex::core::definePointCloud(pxr::UsdStagePtr stage, const pxr::SdfPath &path, const pxr::VtVec3fArray &points, std::optional< const pxr::VtInt64Array > ids=std::nullopt, std::optional< const FloatPrimvarData > widths=std::nullopt, std::optional< const Vec3fPrimvarData > normals=std::nullopt, std::optional< const Vec3fPrimvarData > displayColor=std::nullopt, std::optional< const FloatPrimvarData > displayOpacity=std::nullopt)
Defines a
UsdGeomPoints
prim on the stage.- pxr::UsdGeomPoints usdex::core::definePointCloud(pxr::UsdPrim parent, const std::string &name, const pxr::VtVec3fArray &points, std::optional< const pxr::VtInt64Array > ids=std::nullopt, std::optional< const FloatPrimvarData > widths=std::nullopt, std::optional< const Vec3fPrimvarData > normals=std::nullopt, std::optional< const Vec3fPrimvarData > displayColor=std::nullopt, std::optional< const FloatPrimvarData > displayOpacity=std::nullopt)
Defines a
UsdGeomPoints
prim on the stage.
Functions#
- pxr::UsdGeomPoints usdex::core::definePointCloud(
- pxr::UsdStagePtr stage,
- const pxr::SdfPath &path,
- const pxr::VtVec3fArray &points,
- std::optional<const pxr::VtInt64Array> ids = std::nullopt,
- std::optional<const FloatPrimvarData> widths = std::nullopt,
- std::optional<const Vec3fPrimvarData> normals = std::nullopt,
- std::optional<const Vec3fPrimvarData> displayColor = std::nullopt,
- std::optional<const FloatPrimvarData> displayOpacity = std::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
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.Ids
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 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 definedUsdPrim
- pxr::UsdGeomPoints usdex::core::definePointCloud(
- pxr::UsdPrim parent,
- const std::string &name,
- const pxr::VtVec3fArray &points,
- std::optional<const pxr::VtInt64Array> ids = std::nullopt,
- std::optional<const FloatPrimvarData> widths = std::nullopt,
- std::optional<const Vec3fPrimvarData> normals = std::nullopt,
- std::optional<const Vec3fPrimvarData> displayColor = std::nullopt,
- std::optional<const FloatPrimvarData> displayOpacity = std::nullopt,
Defines a
UsdGeomPoints
prim on the stage.This is an overloaded member function, provided for convenience. It differs from the above function only in what arguments it accepts.
- Parameters:
parent – Prim below which to define the curves.
name – Name of the curves.
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 definedUsdPrim