24 #ifndef PXR_USD_USD_GEOM_XFORM_OP_H
25 #define PXR_USD_USD_GEOM_XFORM_OP_H
39 #include <hboost/variant.hpp>
47 #define USDGEOM_XFORM_OP_TYPES \
61 ((resetXformStack, "!resetXformStack!"))
266 template <
typename T>
269 if (!
Get(&v, time)) {
276 "requested type %s.",
GetAttr().GetPath().GetText(),
297 bool isInverseOp=
false);
318 return hboost::apply_visitor(_GetMightBeTimeVarying(), _attr);
332 return hboost::apply_visitor(_GetAttr(), _attr);
345 explicit operator bool()
const {
360 return !(lhs == rhs);
382 template <
typename T>
384 return hboost::apply_visitor(_Get<T>(value,
time), _attr);
393 template <
typename T>
399 "Please set value on the paired non-inverse xformOp instead.",
410 return hboost::apply_visitor(_GetTimeSamples(times), _attr);
416 std::vector<double> *times)
const {
417 return hboost::apply_visitor(
418 _GetTimeSamplesInInterval(interval, times), _attr);
423 return hboost::apply_visitor(_GetNumTimeSamples(), _attr);
427 struct _ValidAttributeTagType {};
434 _ValidAttributeTagType);
437 _ValidAttributeTagType);
445 static Type _GetOpTypeEnumFromCString(
char const *str,
size_t len);
455 const TfToken &opName,
bool *isInverseOp);
459 void _CreateAttributeQuery()
const {
491 mutable hboost::variant<UsdAttribute, UsdAttributeQuery> _attr;
498 struct _Get :
public hboost::static_visitor<bool>
511 return attrQuery.
Get(value,
time);
519 struct _GetAttr :
public hboost::static_visitor<const UsdAttribute &> {
535 struct _GetTimeSamples :
public hboost::static_visitor<bool> {
537 _GetTimeSamples(std::vector<double> *times_) : times(times_) {}
549 std::vector<double> *times;
553 struct _GetTimeSamplesInInterval :
public hboost::static_visitor<bool> {
555 _GetTimeSamplesInInterval(
const GfInterval &interval_,
556 std::vector<double> *times_)
557 : interval(interval_), times(times_)
571 std::vector<double> *times;
575 struct _GetNumTimeSamples :
public hboost::static_visitor<size_t> {
577 _GetNumTimeSamples() {}
591 struct _GetMightBeTimeVarying :
public hboost::static_visitor<bool> {
593 _GetMightBeTimeVarying() {}
612 #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