UsdGeomPrimvars Algorithms

Utilities to author and inspect UsdGeomPrimvars

UsdGeomPrimvars are often used when authoring UsdGeomPointBased prims (e.g meshes, curves, and point clouds) to describe surface varying properties that can affect how a prim is rendered, or to drive a surface deformation.

However, UsdGeomPrimvar data can be quite intricate to use, especially with respect to indexed vs non-indexed primvars, element size, the complexities of VtArray detach (copy-on-write) semantics, and the ambiguity of “native” attributes vs primvar attributes (e.g. mesh normals).

These functions aim to provide simpler entry points to avoid common mistakes with respect to UsdGeomPrimvar data handling.

Classes

omni::connect::core::PrimvarData

A templated read-only class to manage all UsdGeomPrimvar data as a single object without risk of detaching (copying) arrays.

Typedefs

omni::connect::core::FloatPrimvarData

An alias for PrimvarData that holds VtFloatArray values (e.g widths or scale factors).

omni::connect::core::Int64PrimvarData

An alias for PrimvarData that holds VtInt64Array values (e.g ids that might be very large).

omni::connect::core::IntPrimvarData

An alias for PrimvarData that holds VtIntArray values (e.g simple switch values or booleans consumable by shaders).

omni::connect::core::StringPrimvarData

An alias for PrimvarData that holds VtStringArray values (e.g human readable descriptors).

omni::connect::core::TokenPrimvarData

An alias for PrimvarData that holds VtTokenArray values (e.g more efficient human readable descriptors).

omni::connect::core::Vec2fPrimvarData

An alias for PrimvarData that holds VtVec2fArray values (e.g texture coordinates).

omni::connect::core::Vec3fPrimvarData

An alias for PrimvarData that holds VtVec3fArray values (e.g normals, colors, or other vectors).