|
Schema wrapper for UsdAttribute for authoring and introspecting attributes that serve as inbetween shapes of a UsdSkelBlendShape. More...
#include <inbetweenShape.h>
Public Member Functions | |
UsdSkelInbetweenShape () | |
Default constructor returns an invalid inbetween shape. | |
USDSKEL_API | UsdSkelInbetweenShape (const UsdAttribute &attr) |
Speculative constructor that will produce a valid UsdSkelInbetweenShape when attr already represents an attribute that is an Inbetween, and produces an invalid Inbetween otherwise (i.e. | |
USDSKEL_API bool | GetWeight (float *weight) const |
Return the location at which the shape is applied. | |
USDSKEL_API bool | SetWeight (float weight) const |
Set the location at which the shape is applied. | |
USDSKEL_API bool | HasAuthoredWeight () const |
Has a weight value been explicitly authored on this shape? | |
USDSKEL_API bool | GetOffsets (VtVec3fArray *offsets) const |
Get the point offsets corresponding to this shape. | |
USDSKEL_API bool | SetOffsets (const VtVec3fArray &offsets) const |
Set the point offsets corresponding to this shape. | |
USDSKEL_API UsdAttribute | GetNormalOffsetsAttr () const |
Returns a valid normal offsets attribute if the shape has normal offsets. | |
USDSKEL_API UsdAttribute | CreateNormalOffsetsAttr (const VtValue &defaultValue=VtValue()) const |
Returns the existing normal offsets attribute if the shape has normal offsets, or creates a new one. | |
USDSKEL_API bool | GetNormalOffsets (VtVec3fArray *offsets) const |
Get the normal offsets authored for this shape. | |
USDSKEL_API bool | SetNormalOffsets (const VtVec3fArray &offsets) const |
Set the normal offsets authored for this shape. | |
UsdAttribute API | |
operator UsdAttribute const & () const | |
Allow UsdSkelInbetweenShape to auto-convert to UsdAttribute, so you can pass a UsdSkelInbetweenShape to any function that accepts a UsdAttribute or const-ref thereto. | |
UsdAttribute const & | GetAttr () const |
Explicit UsdAttribute extractor. | |
bool | IsDefined () const |
Return true if the wrapped UsdAttribute::IsDefined(), and in addition the attribute is identified as an Inbetween. | |
operator bool () const | |
Return true if this Inbetween is valid for querying and authoring values and metadata, which is identically equivalent to IsDefined(). | |
bool | operator== (const UsdSkelInbetweenShape &o) const |
bool | operator!= (const UsdSkelInbetweenShape &o) const |
Static Public Member Functions | |
static USDSKEL_API bool | IsInbetween (const UsdAttribute &attr) |
Test whether a given UsdAttribute represents a valid Inbetween, which implies that creating a UsdSkelInbetweenShape from the attribute will succeed. | |
Friends | |
class | UsdSkelBlendShape |
Schema wrapper for UsdAttribute for authoring and introspecting attributes that serve as inbetween shapes of a UsdSkelBlendShape.
Inbetween shapes allow an explicit shape to be specified when the blendshape to which it's bound is evaluated at a certain weight. For example, rather than performing piecewise linear interpolation between a primary shape and the rest shape at weight 0.5, an inbetween shape could be defined at the weight. For weight values greater than 0.5, a shape would then be resolved by linearly interpolating between the inbetween shape and the primary shape, while for weight values less than or equal to 0.5, the shape is resolved by linearly interpolating between the inbetween shape and the primary shape.
Definition at line 33 of file inbetweenShape.h.
|
inline |
Default constructor returns an invalid inbetween shape.
Definition at line 37 of file inbetweenShape.h.
|
explicit |
Speculative constructor that will produce a valid UsdSkelInbetweenShape when attr
already represents an attribute that is an Inbetween, and produces an invalid Inbetween otherwise (i.e.
operator bool() will return false).
Calling UsdSkelInbetweenShape::IsInbetween(attr)
will return the same truth value as this constructor, but if you plan to subsequently use the Inbetween anyways, just use this constructor.
USDSKEL_API UsdAttribute CreateNormalOffsetsAttr | ( | const VtValue & | defaultValue = VtValue() | ) | const |
Returns the existing normal offsets attribute if the shape has normal offsets, or creates a new one.
|
inline |
Explicit UsdAttribute extractor.
Definition at line 111 of file inbetweenShape.h.
USDSKEL_API bool GetNormalOffsets | ( | VtVec3fArray * | offsets | ) | const |
Get the normal offsets authored for this shape.
Normal offsets are optional, and may be left unspecified.
USDSKEL_API UsdAttribute GetNormalOffsetsAttr | ( | ) | const |
Returns a valid normal offsets attribute if the shape has normal offsets.
Returns an invalid attribute otherwise.
USDSKEL_API bool GetOffsets | ( | VtVec3fArray * | offsets | ) | const |
Get the point offsets corresponding to this shape.
USDSKEL_API bool GetWeight | ( | float * | weight | ) | const |
Return the location at which the shape is applied.
USDSKEL_API bool HasAuthoredWeight | ( | ) | const |
Has a weight value been explicitly authored on this shape?
|
inline |
Return true if the wrapped UsdAttribute::IsDefined(), and in addition the attribute is identified as an Inbetween.
Definition at line 115 of file inbetweenShape.h.
|
static |
Test whether a given UsdAttribute represents a valid Inbetween, which implies that creating a UsdSkelInbetweenShape from the attribute will succeed.
Succes implies that attr.IsDefined()
is true.
|
inlineexplicit |
Return true if this Inbetween is valid for querying and authoring values and metadata, which is identically equivalent to IsDefined().
Definition at line 121 of file inbetweenShape.h.
|
inline |
Allow UsdSkelInbetweenShape to auto-convert to UsdAttribute, so you can pass a UsdSkelInbetweenShape to any function that accepts a UsdAttribute or const-ref thereto.
Definition at line 108 of file inbetweenShape.h.
|
inline |
Definition at line 129 of file inbetweenShape.h.
|
inline |
Definition at line 125 of file inbetweenShape.h.
USDSKEL_API bool SetNormalOffsets | ( | const VtVec3fArray & | offsets | ) | const |
Set the normal offsets authored for this shape.
USDSKEL_API bool SetOffsets | ( | const VtVec3fArray & | offsets | ) | const |
Set the point offsets corresponding to this shape.
USDSKEL_API bool SetWeight | ( | float | weight | ) | const |
Set the location at which the shape is applied.
|
friend |
Definition at line 136 of file inbetweenShape.h.