24 #ifndef PXR_USD_SDF_LAYER_OFFSET_H
25 #define PXR_USD_SDF_LAYER_OFFSET_H
30 #include "pxr/usd/sdf/api.h"
32 #include <boost/operators.hpp>
36 PXR_NAMESPACE_OPEN_SCOPE
83 void SetOffset(
double newOffset) { _offset = newOffset; }
86 void SetScale(
double newScale) { _scale = newScale; }
112 size_t operator()(
const SdfLayerOffset &offset)
const {
117 friend inline size_t hash_value(
const SdfLayerOffset &offset) {
128 bool operator==(
const SdfLayerOffset &rhs)
const;
133 bool operator<(
const SdfLayerOffset &rhs)
const;
138 SdfLayerOffset
operator*(
const SdfLayerOffset &rhs)
const;
155 typedef std::vector<SdfLayerOffset> SdfLayerOffsetVector;
161 const SdfLayerOffset &layerOffset );
163 PXR_NAMESPACE_CLOSE_SCOPE
165 #endif // PXR_USD_SDF_LAYER_OFFSET_H
void SetOffset(double newOffset)
Sets the time offset.
SDF_API bool IsIdentity() const
Returns true if this is an identity transformation, with an offset of 0.0 and a scale of 1...
SDF_API bool operator<(const SdfLayerOffset &rhs) const
Returns whether this offset is less than another.
SDF_API bool IsValid() const
Returns true if this offset is valid, i.e.
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...
double GetScale() const
Returns the time scale factor.
SDF_API SdfLayerOffset GetInverse() const
Gets the inverse offset, which performs the opposite transformation.
Value type that represents a time code.
SDF_API bool operator==(const SdfLayerOffset &rhs) const
Returns whether the offsets are equal.
Hash functor for hash maps and sets.
void SetScale(double newScale)
Sets the time scale factor.
GF_API std::ostream & operator<<(std::ostream &, const GfBBox3d &)
Output a GfBBox3d using the format [(range) matrix zeroArea].
SDF_API SdfLayerOffset(double offset=0.0, double scale=1.0)
Constructs a new SdfLayerOffset instance.
SDF_API size_t GetHash() const
Returns hash for this offset.
double GetOffset() const
Returns the time offset.
Represents a time offset and scale between layers.