7#ifndef PXR_USD_SDF_TIME_CODE_H
8#define PXR_USD_SDF_TIME_CODE_H
13#include "pxr/usd/sdf/api.h"
19PXR_NAMESPACE_OPEN_SCOPE
37 constexpr SdfTimeCode(
double time = 0.0) noexcept : _time(time) {};
44 constexpr bool operator==(
const SdfTimeCode &rhs)
const noexcept
45 {
return _time == rhs._time; }
46 constexpr bool operator!=(
const SdfTimeCode &rhs)
const noexcept
47 {
return _time != rhs._time; }
48 constexpr bool operator<(
const SdfTimeCode &rhs)
const noexcept
49 {
return _time < rhs._time; }
50 constexpr bool operator>(
const SdfTimeCode &rhs)
const noexcept
51 {
return _time > rhs._time; }
52 constexpr bool operator<=(
const SdfTimeCode &rhs)
const noexcept
53 {
return _time <= rhs._time; }
54 constexpr bool operator>=(
const SdfTimeCode &rhs)
const noexcept
55 {
return _time >= rhs._time; }
67 explicit constexpr operator double() const noexcept {
return _time;}
71 return std::hash<double>()(_time);
98 std::swap(lhs._time, rhs._time);
125bool operator==(
double time,
const SdfTimeCode &timeCode)
noexcept
129bool operator!=(
double time,
const SdfTimeCode &timeCode)
noexcept
133bool operator<(
double time,
const SdfTimeCode &timeCode)
noexcept
137bool operator>(
double time,
const SdfTimeCode &timeCode)
noexcept
141bool operator<=(
double time,
const SdfTimeCode &timeCode)
noexcept
145bool operator>=(
double time,
const SdfTimeCode &timeCode)
noexcept
153PXR_NAMESPACE_CLOSE_SCOPE
Value type that represents a time code.
constexpr double GetValue() const noexcept
Return the time value.
constexpr SdfTimeCode(double time=0.0) noexcept
Construct a time code with the given time.
size_t GetHash() const
Hash function.
GF_API std::ostream & operator<<(std::ostream &, const GfBBox3d &)
Output a GfBBox3d using the format [(range) matrix zeroArea].