HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
loopParams.h
Go to the documentation of this file.
1 //
2 // Copyright 2023 Pixar
3 //
4 // Licensed under the Apache License, Version 2.0 (the "Apache License")
5 // with the following modification; you may not use this file except in
6 // compliance with the Apache License and the following modification to it:
7 // Section 6. Trademarks. is deleted and replaced with:
8 //
9 // 6. Trademarks. This License does not grant permission to use the trade
10 // names, trademarks, service marks, or product names of the Licensor
11 // and its affiliates, except as required to comply with Section 4(c) of
12 // the License and to reproduce the content of the NOTICE file.
13 //
14 // You may obtain a copy of the Apache License at
15 //
16 // http://www.apache.org/licenses/LICENSE-2.0
17 //
18 // Unless required by applicable law or agreed to in writing, software
19 // distributed under the Apache License with the above modification is
20 // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21 // KIND, either express or implied. See the Apache License for the specific
22 // language governing permissions and limitations under the Apache License.
23 //
24 
25 #ifndef PXR_BASE_TS_LOOP_PARAMS_H
26 #define PXR_BASE_TS_LOOP_PARAMS_H
27 
28 #include "pxr/pxr.h"
29 #include "pxr/base/ts/api.h"
30 #include "pxr/base/ts/types.h"
31 
32 #include <iosfwd>
33 #include <string>
34 
36 
38 {
39 public:
40  TS_API
42  bool looping,
43  TsTime start,
44  TsTime period,
45  TsTime preRepeatFrames,
46  TsTime repeatFrames,
47  double valueOffset);
48 
49  TS_API
50  TsLoopParams();
51 
52  TS_API
53  void SetLooping(bool looping);
54 
55  TS_API
56  bool GetLooping() const;
57 
58  TS_API
59  double GetStart() const;
60 
61  TS_API
62  double GetPeriod() const;
63 
64  TS_API
65  double GetPreRepeatFrames() const;
66 
67  TS_API
68  double GetRepeatFrames() const;
69 
70  TS_API
71  const GfInterval &GetMasterInterval() const;
72 
73  TS_API
74  const GfInterval &GetLoopedInterval() const;
75 
76  TS_API
77  bool IsValid() const;
78 
79  TS_API
80  void SetValueOffset(double valueOffset);
81 
82  TS_API
83  double GetValueOffset() const;
84 
85  TS_API
86  bool operator==(const TsLoopParams &rhs) const {
87  return _looping == rhs._looping &&
88  _loopedInterval == rhs._loopedInterval &&
89  _masterInterval == rhs._masterInterval &&
90  _valueOffset == rhs._valueOffset;
91  }
92 
93  TS_API
94  bool operator!=(const TsLoopParams &rhs) const {
95  return !(*this == rhs);
96  }
97 
98 private:
99  bool _looping;
100  GfInterval _loopedInterval;
101  GfInterval _masterInterval;
102  double _valueOffset;
103 };
104 
105 TS_API
106 std::ostream& operator<<(std::ostream& out, const TsLoopParams& lp);
107 
109 
110 #endif
TS_API double GetPeriod() const
TS_API double GetValueOffset() const
TS_API void SetValueOffset(double valueOffset)
TS_API bool GetLooping() const
TS_API const GfInterval & GetLoopedInterval() const
TS_API void SetLooping(bool looping)
GLuint start
Definition: glcorearb.h:475
TS_API double GetRepeatFrames() const
TS_API bool operator!=(const TsLoopParams &rhs) const
Definition: loopParams.h:94
TS_API std::ostream & operator<<(std::ostream &out, const TsLoopParams &lp)
TS_API double GetPreRepeatFrames() const
TS_API bool IsValid() const
TS_API TsLoopParams()
TS_API bool operator==(const TsLoopParams &rhs) const
Definition: loopParams.h:86
PXR_NAMESPACE_OPEN_SCOPE typedef double TsTime
The time type used by Ts.
Definition: types.h:57
#define TS_API
Definition: api.h:41
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1432
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:91
TS_API double GetStart() const
TS_API const GfInterval & GetMasterInterval() const