24 #ifndef PXR_USD_USD_GEOM_XFORM_OP_H
25 #define PXR_USD_USD_GEOM_XFORM_OP_H
46 #define USDGEOM_XFORM_OP_TYPES \
60 ((resetXformStack, "!resetXformStack!"))
265 template <
typename T>
268 if (!
Get(&v, time)) {
275 "requested type %s.",
GetAttr().GetPath().GetText(),
296 bool isInverseOp=
false);
317 return std::visit(_GetMightBeTimeVarying(), _attr);
331 return std::visit(_GetAttr(), _attr);
344 explicit operator bool()
const {
359 return !(lhs == rhs);
381 template <
typename T>
383 return std::visit(_Get<T>(value,
time), _attr);
392 template <
typename T>
398 "Please set value on the paired non-inverse xformOp instead.",
409 return std::visit(_GetTimeSamples(times), _attr);
415 std::vector<double> *times)
const {
417 _GetTimeSamplesInInterval(interval, times), _attr);
422 return std::visit(_GetNumTimeSamples(), _attr);
426 struct _ValidAttributeTagType {};
433 _ValidAttributeTagType);
436 _ValidAttributeTagType);
444 static Type _GetOpTypeEnumFromCString(
char const *str,
size_t len);
454 const TfToken &opName,
bool *isInverseOp);
458 void _CreateAttributeQuery()
const {
490 mutable std::variant<UsdAttribute, UsdAttributeQuery> _attr;
510 return attrQuery.
Get(value,
time);
534 struct _GetTimeSamples {
536 _GetTimeSamples(std::vector<double> *times_) : times(times_) {}
548 std::vector<double> *times;
552 struct _GetTimeSamplesInInterval {
554 _GetTimeSamplesInInterval(
const GfInterval &interval_,
555 std::vector<double> *times_)
556 : interval(interval_), times(times_)
570 std::vector<double> *times;
574 struct _GetNumTimeSamples {
576 _GetNumTimeSamples() {}
590 struct _GetMightBeTimeVarying {
592 _GetMightBeTimeVarying() {}
611 #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