7#ifndef PXR_USD_SDF_LAYER_OFFSET_H
8#define PXR_USD_SDF_LAYER_OFFSET_H
13#include "pxr/usd/sdf/api.h"
19PXR_NAMESPACE_OPEN_SCOPE
50 : _offset(offset), _scale(scale) {}
64 void SetOffset(
double newOffset) { _offset = newOffset; }
67 void SetScale(
double newScale) { _scale = newScale; }
75 if (_offset == 0.0 && _scale == 1.0) {
124 return !(*
this == rhs);
139 return !(*
this < rhs);
144 return !(*
this > rhs);
167typedef std::vector<SdfLayerOffset> SdfLayerOffsetVector;
175PXR_NAMESPACE_CLOSE_SCOPE
Value type that represents a time code.
Represents a time offset and scale between layers.
bool operator>(const SdfLayerOffset &rhs) const
double GetScale() const
Returns the time scale factor.
bool IsIdentity() const
Returns true if this is an identity transformation, with an offset of 0.0 and a scale of 1....
SDF_API SdfLayerOffset GetInverse() const
Gets the inverse offset, which performs the opposite transformation.
SDF_API bool IsValid() const
Returns true if this offset is valid, i.e.
bool operator>=(const SdfLayerOffset &rhs) const
bool operator!=(const SdfLayerOffset &rhs) const
SDF_API SdfLayerOffset operator*(const SdfLayerOffset &rhs) const
Composes this with the offset rhs, such that the resulting offset is equivalent to first applying rhs...
SDF_API GfTimeCode operator*(const GfTimeCode &rhs) const
Applies the offset to the given value.
SDF_API bool operator==(const SdfLayerOffset &rhs) const
Returns whether the offsets are equal.
SDF_API bool operator<(const SdfLayerOffset &rhs) const
Returns whether this offset is less than another.
bool operator<=(const SdfLayerOffset &rhs) const
SdfLayerOffset(double offset=0.0, double scale=1.0)
Constructs a new SdfLayerOffset instance.
void SetOffset(double newOffset)
Sets the time offset.
double GetOffset() const
Returns the time offset.
SDF_API double operator*(double rhs) const
Applies the offset to the given value.
void SetScale(double newScale)
Sets the time scale factor.
SDF_API size_t GetHash() const
Returns hash for this offset.
SDF_API std::ostream & operator<<(std::ostream &out, const SdfLayerOffset &layerOffset)
Writes the string representation of SdfLayerOffset to out.
Hash functor for hash maps and sets.