7 #ifndef PXR_USD_USD_GEOM_XFORM_OP_H
8 #define PXR_USD_USD_GEOM_XFORM_OP_H
29 #define USDGEOM_XFORM_OP_TYPES \
49 ((resetXformStack, "!resetXformStack!"))
268 template <
typename T>
271 if (!
Get(&v, time)) {
278 "requested type %s.",
GetAttr().GetPath().GetText(),
299 bool isInverseOp=
false);
320 return std::visit(_GetMightBeTimeVarying(), _attr);
334 return std::visit(_GetAttr(), _attr);
347 explicit operator bool()
const {
362 return !(lhs == rhs);
384 template <
typename T>
386 return std::visit(_Get<T>(value,
time), _attr);
395 template <
typename T>
401 "Please set value on the paired non-inverse xformOp instead.",
412 return std::visit(_GetTimeSamples(times), _attr);
418 std::vector<double> *times)
const {
420 _GetTimeSamplesInInterval(interval, times), _attr);
425 return std::visit(_GetNumTimeSamples(), _attr);
429 struct _ValidAttributeTagType {};
436 _ValidAttributeTagType);
439 _ValidAttributeTagType);
447 static Type _GetOpTypeEnumFromCString(
char const *str,
size_t len);
457 const TfToken &opName,
bool *isInverseOp);
461 void _CreateAttributeQuery()
const {
493 mutable std::variant<UsdAttribute, UsdAttributeQuery> _attr;
513 return attrQuery.
Get(value,
time);
537 struct _GetTimeSamples {
539 _GetTimeSamples(std::vector<double> *times_) : times(times_) {}
551 std::vector<double> *times;
555 struct _GetTimeSamplesInInterval {
557 _GetTimeSamplesInInterval(
const GfInterval &interval_,
558 std::vector<double> *times_)
559 : interval(interval_), times(times_)
573 std::vector<double> *times;
577 struct _GetNumTimeSamples {
579 _GetNumTimeSamples() {}
593 struct _GetMightBeTimeVarying {
595 _GetMightBeTimeVarying() {}
614 #endif // USD_XFORMOP_H
bool Get(T *value, UsdTimeCode time=UsdTimeCode::Default()) const
static constexpr UsdTimeCode Default()
T const & UncheckedGet() const &
bool Get(T *value, UsdTimeCode time=UsdTimeCode::Default()) const
USD_API TfToken GetBaseName() const
GT_API const UT_StringHolder time
GLsizei const GLfloat * value
static TF_API std::string GetCanonicalTypeName(const std::type_info &)
USD_API size_t GetNumTimeSamples() const
USD_API SdfValueTypeName GetTypeName() const
Return the "scene description" value type name for this attribute.
bool IsEmpty() const
Returns true iff this value is empty.
USD_API bool ValueMightBeTimeVarying() const
USD_API std::vector< std::string > SplitName() const
USD_API bool GetTimeSamples(std::vector< double > *times) const
USD_API size_t GetNumTimeSamples() const
USD_API TfToken GetNamespace() const
bool Set(const T &value, UsdTimeCode time=UsdTimeCode::Default()) const
const TfToken & GetName() const
GLenum GLint GLint * precision
USD_API bool GetTimeSamples(std::vector< double > *times) const
USD_API bool GetTimeSamplesInInterval(const GfInterval &interval, std::vector< double > *times) const
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
static VtValue Cast(VtValue const &val)
TF_API const std::string & GetTypeName() const
#define PXR_NAMESPACE_CLOSE_SCOPE
USD_API bool GetTimeSamplesInInterval(const GfInterval &interval, std::vector< double > *times) const
USD_API const UsdAttribute & GetAttribute() const
Return the attribute associated with this query.
SDF_API const TfType & GetType() const
Returns the TfType of the type.
USD_API bool ValueMightBeTimeVarying() const