All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UsdSkelInbetweenShape Class Reference

Schema wrapper for UsdAttribute for authoring and introspecting attributes that serve as inbetween shapes of a UsdSkelBlendShape. More...

Public Member Functions

 UsdSkelInbetweenShape ()
 Default constructor returns an invalid inbetween shape. More...
 
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. More...
 
USDSKEL_API bool GetWeight (float *weight) const
 Return the location at which the shape is applied. More...
 
USDSKEL_API bool SetWeight (float weight)
 Set the location at which the shape is applied. More...
 
USDSKEL_API bool HasAuthoredWeight () const
 Has a weight value been explicitly authored on this shape? More...
 
USDSKEL_API bool GetOffsets (VtVec3fArray *offsets) const
 Get the point offsets corresponding to this shape. More...
 
USDSKEL_API bool SetOffsets (const VtVec3fArray &offsets) const
 Set the point offsets corresponding to this shape. More...
 
USDSKEL_API UsdAttribute GetNormalOffsetsAttr () const
 Returns a valid normal offsets attribute if the shape has normal offsets. More...
 
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. More...
 
USDSKEL_API bool GetNormalOffsets (VtVec3fArray *offsets) const
 Get the normal offsets authored for this shape. More...
 
USDSKEL_API bool SetNormalOffsets (const VtVec3fArray &offsets) const
 Set the normal offsets authored for this shape. More...
 
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. More...
 
UsdAttribute const & GetAttr () const
 Explicit UsdAttribute extractor. More...
 
bool IsDefined () const
 Return true if the wrapped UsdAttribute::IsDefined(), and in addition the attribute is identified as an Inbetween. More...
 
 operator bool () const
 
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. More...
 

Friends

class UsdSkelBlendShape
 

Detailed Description

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 50 of file inbetweenShape.h.

Constructor & Destructor Documentation

Default constructor returns an invalid inbetween shape.

Definition at line 54 of file inbetweenShape.h.

USDSKEL_API UsdSkelInbetweenShape ( const UsdAttribute attr)
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.

Member Function Documentation

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.

UsdAttribute const& GetAttr ( ) const
inline

Explicit UsdAttribute extractor.

Definition at line 128 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?

See Also
GetWeight()
bool IsDefined ( ) const
inline

Return true if the wrapped UsdAttribute::IsDefined(), and in addition the attribute is identified as an Inbetween.

Definition at line 132 of file inbetweenShape.h.

static USDSKEL_API bool IsInbetween ( const UsdAttribute attr)
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.

operator bool ( ) const
inlineexplicit

Return true if this Inbetween is valid for querying and authoring values and metadata, which is identically equivalent to IsDefined().

Definition at line 138 of file inbetweenShape.h.

operator UsdAttribute const & ( ) const
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 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)

Set the location at which the shape is applied.


The documentation for this class was generated from the following file: