Loading...
Searching...
No Matches
tsTest_Evaluator.h
1//
2// Copyright 2023 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7
8#ifndef PXR_BASE_TS_TS_TEST_EVALUATOR_H
9#define PXR_BASE_TS_TS_TEST_EVALUATOR_H
10
11#include "pxr/pxr.h"
12#include "pxr/base/ts/api.h"
13#include "pxr/base/ts/tsTest_SplineData.h"
14#include "pxr/base/ts/tsTest_SampleTimes.h"
15#include "pxr/base/ts/tsTest_Types.h"
16
17#include <vector>
18
19PXR_NAMESPACE_OPEN_SCOPE
20
21class TS_API TsTest_Evaluator
22{
23public:
24 // Required. Evaluates a spline at the specified times.
25 virtual TsTest_SampleVec Eval(
26 const TsTest_SplineData &splineData,
27 const TsTest_SampleTimes &sampleTimes) const = 0;
28
29 // Optional. Produces samples at implementation-determined times,
30 // sufficient to produce a piecewise linear approximation of the spline with
31 // an absolute value error less than the specified tolerance. Default
32 // implementation returns no samples.
33 virtual TsTest_SampleVec Sample(
34 const TsTest_SplineData &splineData,
35 double tolerance) const;
36
37 // Optional. Produce a copy of splineData with inner loops, if any, baked
38 // out into ordinary knots. Default implementation returns the input data
39 // unmodified.
40 virtual TsTest_SplineData BakeInnerLoops(
41 const TsTest_SplineData &splineData) const;
42};
43
44PXR_NAMESPACE_CLOSE_SCOPE
45
46#endif