Loading...
Searching...
No Matches
UsdSkelInbetweenShape Class Reference

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
 

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

◆ UsdSkelInbetweenShape() [1/2]

Default constructor returns an invalid inbetween shape.

Definition at line 54 of file inbetweenShape.h.

◆ UsdSkelInbetweenShape() [2/2]

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

◆ CreateNormalOffsetsAttr()

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.

◆ GetAttr()

UsdAttribute const & GetAttr ( ) const
inline

Explicit UsdAttribute extractor.

Definition at line 128 of file inbetweenShape.h.

◆ GetNormalOffsets()

USDSKEL_API bool GetNormalOffsets ( VtVec3fArray *  offsets) const

Get the normal offsets authored for this shape.

Normal offsets are optional, and may be left unspecified.

◆ GetNormalOffsetsAttr()

USDSKEL_API UsdAttribute GetNormalOffsetsAttr ( ) const

Returns a valid normal offsets attribute if the shape has normal offsets.

Returns an invalid attribute otherwise.

◆ GetOffsets()

USDSKEL_API bool GetOffsets ( VtVec3fArray *  offsets) const

Get the point offsets corresponding to this shape.

◆ GetWeight()

USDSKEL_API bool GetWeight ( float *  weight) const

Return the location at which the shape is applied.

◆ HasAuthoredWeight()

USDSKEL_API bool HasAuthoredWeight ( ) const

Has a weight value been explicitly authored on this shape?

See also
GetWeight()

◆ IsDefined()

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.

◆ IsInbetween()

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()

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 &()

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.

◆ operator!=()

bool operator!= ( const UsdSkelInbetweenShape o) const
inline

Definition at line 146 of file inbetweenShape.h.

◆ operator==()

bool operator== ( const UsdSkelInbetweenShape o) const
inline

Definition at line 142 of file inbetweenShape.h.

◆ SetNormalOffsets()

USDSKEL_API bool SetNormalOffsets ( const VtVec3fArray &  offsets) const

Set the normal offsets authored for this shape.

◆ SetOffsets()

USDSKEL_API bool SetOffsets ( const VtVec3fArray &  offsets) const

Set the point offsets corresponding to this shape.

◆ SetWeight()

USDSKEL_API bool SetWeight ( float  weight) const

Set the location at which the shape is applied.

Friends And Related Function Documentation

◆ UsdSkelBlendShape

friend class UsdSkelBlendShape
friend

Definition at line 153 of file inbetweenShape.h.


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