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

#include <inbetweenShape.h>

Public Member Functions

 UsdSkelInbetweenShape ()
 Default constructor returns an invalid inbetween shape. More...
 
USDSKEL_API UsdSkelInbetweenShape (const UsdAttribute &attr)
 
USDSKEL_API bool GetWeight (float *weight) const
 Return the location at which the shape is applied. More...
 
USDSKEL_API bool SetWeight (float weight) const
 Set the location at which the shape is applied. More...
 
USDSKEL_API bool HasAuthoredWeight () const
 
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
 
USDSKEL_API UsdAttribute CreateNormalOffsetsAttr (const VtValue &defaultValue=VtValue()) const
 
USDSKEL_API bool GetNormalOffsets (VtVec3fArray *offsets) const
 
USDSKEL_API bool SetNormalOffsets (const VtVec3fArray &offsets) const
 Set the normal offsets authored for this shape. More...
 
UsdAttribute API
 operator UsdAttribute const & () const
 
UsdAttribute const & GetAttr () const
 Explicit UsdAttribute extractor. More...
 
bool IsDefined () const
 
 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)
 

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::UsdSkelInbetweenShape ( )
inline

Default constructor returns an invalid inbetween shape.

Definition at line 54 of file inbetweenShape.h.

USDSKEL_API UsdSkelInbetweenShape::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 UsdSkelInbetweenShape::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& UsdSkelInbetweenShape::GetAttr ( ) const
inline

Explicit UsdAttribute extractor.

Definition at line 128 of file inbetweenShape.h.

USDSKEL_API bool UsdSkelInbetweenShape::GetNormalOffsets ( VtVec3fArray *  offsets) const

Get the normal offsets authored for this shape. Normal offsets are optional, and may be left unspecified.

USDSKEL_API UsdAttribute UsdSkelInbetweenShape::GetNormalOffsetsAttr ( ) const

Returns a valid normal offsets attribute if the shape has normal offsets. Returns an invalid attribute otherwise.

USDSKEL_API bool UsdSkelInbetweenShape::GetOffsets ( VtVec3fArray *  offsets) const

Get the point offsets corresponding to this shape.

USDSKEL_API bool UsdSkelInbetweenShape::GetWeight ( float weight) const

Return the location at which the shape is applied.

USDSKEL_API bool UsdSkelInbetweenShape::HasAuthoredWeight ( ) const

Has a weight value been explicitly authored on this shape?

See Also
GetWeight()
bool UsdSkelInbetweenShape::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 UsdSkelInbetweenShape::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.

UsdSkelInbetweenShape::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.

UsdSkelInbetweenShape::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.

bool UsdSkelInbetweenShape::operator!= ( const UsdSkelInbetweenShape o) 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 146 of file inbetweenShape.h.

bool UsdSkelInbetweenShape::operator== ( const UsdSkelInbetweenShape o) 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 142 of file inbetweenShape.h.

USDSKEL_API bool UsdSkelInbetweenShape::SetNormalOffsets ( const VtVec3fArray &  offsets) const

Set the normal offsets authored for this shape.

USDSKEL_API bool UsdSkelInbetweenShape::SetOffsets ( const VtVec3fArray &  offsets) const

Set the point offsets corresponding to this shape.

USDSKEL_API bool UsdSkelInbetweenShape::SetWeight ( float  weight) const

Set the location at which the shape is applied.

Friends And Related Function Documentation

friend class UsdSkelBlendShape
friend

Definition at line 153 of file inbetweenShape.h.


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