HDK
|
#include <curves.h>
Static Public Member Functions | |
static USDGEOM_API const TfTokenVector & | GetSchemaAttributeNames (bool includeInherited=true) |
static USDGEOM_API UsdGeomCurves | Get (const UsdStagePtr &stage, const SdfPath &path) |
static USDGEOM_API bool | ComputeExtent (const VtVec3fArray &points, const VtFloatArray &widths, VtVec3fArray *extent) |
static USDGEOM_API bool | ComputeExtent (const VtVec3fArray &points, const VtFloatArray &widths, const GfMatrix4d &transform, VtVec3fArray *extent) |
Static Public Member Functions inherited from UsdGeomPointBased | |
static USDGEOM_API const TfTokenVector & | GetSchemaAttributeNames (bool includeInherited=true) |
static USDGEOM_API UsdGeomPointBased | Get (const UsdStagePtr &stage, const SdfPath &path) |
static USDGEOM_API bool | ComputeExtent (const VtVec3fArray &points, VtVec3fArray *extent) |
static USDGEOM_API bool | ComputeExtent (const VtVec3fArray &points, const GfMatrix4d &transform, VtVec3fArray *extent) |
static USDGEOM_API bool | ComputePointsAtTime (VtArray< GfVec3f > *points, UsdStageWeakPtr &stage, UsdTimeCode time, const VtVec3fArray &positions, const VtVec3fArray &velocities, UsdTimeCode velocitiesSampleTime, const VtVec3fArray &accelerations, float velocityScale=1.0) |
Static Public Member Functions inherited from UsdGeomGprim | |
static USDGEOM_API const TfTokenVector & | GetSchemaAttributeNames (bool includeInherited=true) |
static USDGEOM_API UsdGeomGprim | Get (const UsdStagePtr &stage, const SdfPath &path) |
Static Public Member Functions inherited from UsdGeomBoundable | |
static USDGEOM_API const TfTokenVector & | GetSchemaAttributeNames (bool includeInherited=true) |
static USDGEOM_API UsdGeomBoundable | Get (const UsdStagePtr &stage, const SdfPath &path) |
static USDGEOM_API bool | ComputeExtentFromPlugins (const UsdGeomBoundable &boundable, const UsdTimeCode &time, VtVec3fArray *extent) |
static USDGEOM_API bool | ComputeExtentFromPlugins (const UsdGeomBoundable &boundable, const UsdTimeCode &time, const GfMatrix4d &transform, VtVec3fArray *extent) |
Static Public Member Functions inherited from UsdGeomXformable | |
static USDGEOM_API const TfTokenVector & | GetSchemaAttributeNames (bool includeInherited=true) |
static USDGEOM_API UsdGeomXformable | Get (const UsdStagePtr &stage, const SdfPath &path) |
static USDGEOM_API bool | GetTimeSamples (std::vector< UsdGeomXformOp > const &orderedXformOps, std::vector< double > *times) |
static USDGEOM_API bool | GetTimeSamplesInInterval (std::vector< UsdGeomXformOp > const &orderedXformOps, const GfInterval &interval, std::vector< double > *times) |
static USDGEOM_API bool | GetLocalTransformation (GfMatrix4d *transform, std::vector< UsdGeomXformOp > const &ops, const UsdTimeCode time) |
static USDGEOM_API bool | IsTransformationAffectedByAttrNamed (const TfToken &attrName) |
Static Public Member Functions inherited from UsdGeomImageable | |
static USDGEOM_API const TfTokenVector & | GetSchemaAttributeNames (bool includeInherited=true) |
static USDGEOM_API UsdGeomImageable | Get (const UsdStagePtr &stage, const SdfPath &path) |
static USDGEOM_API const TfTokenVector & | GetOrderedPurposeTokens () |
Static Public Member Functions inherited from UsdTyped | |
static USD_API const TfTokenVector & | GetSchemaAttributeNames (bool includeInherited=true) |
static USD_API UsdTyped | Get (const UsdStagePtr &stage, const SdfPath &path) |
Static Public Member Functions inherited from UsdSchemaBase | |
static const TfTokenVector & | GetSchemaAttributeNames (bool includeInherited=true) |
Static Public Attributes | |
static const UsdSchemaKind | schemaKind = UsdSchemaKind::AbstractTyped |
Static Public Attributes inherited from UsdGeomPointBased | |
static const UsdSchemaKind | schemaKind = UsdSchemaKind::AbstractTyped |
Static Public Attributes inherited from UsdGeomGprim | |
static const UsdSchemaKind | schemaKind = UsdSchemaKind::AbstractTyped |
Static Public Attributes inherited from UsdGeomBoundable | |
static const UsdSchemaKind | schemaKind = UsdSchemaKind::AbstractTyped |
Static Public Attributes inherited from UsdGeomXformable | |
static const UsdSchemaKind | schemaKind = UsdSchemaKind::AbstractTyped |
Static Public Attributes inherited from UsdGeomImageable | |
static const UsdSchemaKind | schemaKind = UsdSchemaKind::AbstractTyped |
Static Public Attributes inherited from UsdTyped | |
static const UsdSchemaKind | schemaKind = UsdSchemaKind::AbstractBase |
Static Public Attributes inherited from UsdSchemaBase | |
static const UsdSchemaKind | schemaKind = UsdSchemaKind::AbstractBase |
Protected Member Functions | |
USDGEOM_API UsdSchemaKind | _GetSchemaKind () const override |
Protected Member Functions inherited from UsdGeomPointBased | |
USDGEOM_API UsdSchemaKind | _GetSchemaKind () const override |
Protected Member Functions inherited from UsdGeomXformable | |
USDGEOM_API UsdSchemaKind | _GetSchemaKind () const override |
Protected Member Functions inherited from UsdTyped | |
USD_API bool | _IsCompatible () const override |
Protected Member Functions inherited from UsdSchemaBase | |
virtual UsdSchemaKind | _GetSchemaType () const |
const TfType & | _GetType () const |
USD_API UsdAttribute | _CreateAttr (TfToken const &attrName, SdfValueTypeName const &typeName, bool custom, SdfVariability variability, VtValue const &defaultValue, bool writeSparsely) const |
Friends | |
class | UsdSchemaRegistry |
Base class for UsdGeomBasisCurves, UsdGeomNurbsCurves, and UsdGeomHermiteCurves. The BasisCurves schema is designed to be analagous to offline renderers' notion of batched curves (such as the classical RIB definition via Basis and Curves statements), while the NurbsCurve schema is designed to be analgous to the NURBS curves found in packages like Maya and Houdini while retaining their consistency with the RenderMan specification for NURBS Patches. HermiteCurves are useful for the interchange of animation guides and paths.
It is safe to use the length of the curve vertex count to derive the number of curves and the number and layout of curve vertices, but this schema should NOT be used to derive the number of curve points. While vertex indices are implicit in all shipped descendent types of this schema, one should not assume that all internal or future shipped schemas will follow this pattern. Be sure to key any indexing behavior off the concrete type, not this abstract type.
Construct a UsdGeomCurves on UsdPrim prim
. Equivalent to UsdGeomCurves::Get(prim.GetStage(), prim.GetPath()) for a valid prim
, but will not immediately throw an error for an invalid prim
|
inlineexplicit |
Construct a UsdGeomCurves on the prim held by schemaObj
. Should be preferred over UsdGeomCurves(schemaObj.GetPrim()), as it preserves SchemaBase state.
|
virtual |
Destructor.
|
overrideprotectedvirtual |
Returns the kind of schema this class belongs to.
Reimplemented from UsdGeomBoundable.
Reimplemented in UsdGeomHermiteCurves, and UsdGeomNurbsCurves.
|
static |
Compute the extent for the curves defined by points and widths.
On success, extent will contain an approximate axis-aligned bounding box of the curve defined by points with the given widths.
This function is to provide easy authoring of extent for usd authoring tools, hence it is static and acts outside a specific prim (as in attribute based methods).
|
static |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Computes the extent as if the matrix transform
was first applied.
USDGEOM_API UsdAttribute UsdGeomCurves::CreateCurveVertexCountsAttr | ( | VtValue const & | defaultValue = VtValue() , |
bool | writeSparsely = false |
||
) | const |
See GetCurveVertexCountsAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. If specified, author defaultValue
as the attribute's default, sparsely (when it makes sense to do so) if writeSparsely
is true
- the default for writeSparsely
is false
.
USDGEOM_API UsdAttribute UsdGeomCurves::CreateWidthsAttr | ( | VtValue const & | defaultValue = VtValue() , |
bool | writeSparsely = false |
||
) | const |
See GetWidthsAttr(), and also Usd_Create_Or_Get_Property for when to use Get vs Create. If specified, author defaultValue
as the attribute's default, sparsely (when it makes sense to do so) if writeSparsely
is true
- the default for writeSparsely
is false
.
|
static |
Return a UsdGeomCurves holding the prim adhering to this schema at path
on stage
. If no prim exists at path
on stage
, or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following:
USDGEOM_API size_t UsdGeomCurves::GetCurveCount | ( | UsdTimeCode | timeCode = UsdTimeCode::Default() | ) | const |
Returns the number of curves as defined by the size of the curveVertexCounts array at timeCode.
snippets.dox GetCount
USDGEOM_API UsdAttribute UsdGeomCurves::GetCurveVertexCountsAttr | ( | ) | const |
Curves-derived primitives can represent multiple distinct, potentially disconnected curves. The length of 'curveVertexCounts' gives the number of such curves, and each element describes the number of vertices in the corresponding curve
Declaration | int[] curveVertexCounts |
C++ Type | VtArray<int> |
Usd Type | SdfValueTypeNames->IntArray |
|
static |
Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes. Does not include attributes that may be authored by custom/extended methods of the schemas involved.
USDGEOM_API UsdAttribute UsdGeomCurves::GetWidthsAttr | ( | ) | const |
Provides width specification for the curves, whose application will depend on whether the curve is oriented (normals are defined for it), in which case widths are "ribbon width", or unoriented, in which case widths are cylinder width. 'widths' is not a generic Primvar, but the number of elements in this attribute will be determined by its 'interpolation'. See SetWidthsInterpolation() . If 'widths' and 'primvars:widths' are both specified, the latter has precedence.
Declaration | float[] widths |
C++ Type | VtArray<float> |
Usd Type | SdfValueTypeNames->FloatArray |
USDGEOM_API TfToken UsdGeomCurves::GetWidthsInterpolation | ( | ) | const |
Get the interpolation for the widths attribute.
Although 'widths' is not classified as a generic UsdGeomPrimvar (and will not be included in the results of UsdGeomPrimvarsAPI::GetPrimvars() ) it does require an interpolation specification. The fallback interpolation, if left unspecified, is UsdGeomTokens->vertex , which means a width value is specified at the end of each curve segment.
USDGEOM_API bool UsdGeomCurves::SetWidthsInterpolation | ( | TfToken const & | interpolation | ) |
Set the interpolation for the widths attribute.
interpolation
is not a legal value as defined by UsdPrimvar::IsValidInterpolation(), or if there was a problem setting the value. No attempt is made to validate that the widths attr's value contains the right number of elements to match its interpolation to its prim's topology.
|
friend |
|
static |
Compile time constant representing what kind of schema this class is.