Blender  V3.3
eval_output_cpu.h
Go to the documentation of this file.
1 // Copyright 2021 Blender Foundation. All rights reserved.
2 //
3 // This program is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU General Public License
5 // as published by the Free Software Foundation; either version 2
6 // of the License, or (at your option) any later version.
7 //
8 // This program is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 // GNU General Public License for more details.
12 //
13 // You should have received a copy of the GNU General Public License
14 // along with this program; if not, write to the Free Software Foundation,
15 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 //
17 // Author: Sergey Sharybin
18 
19 #ifndef OPENSUBDIV_EVAL_OUTPUT_CPU_H_
20 #define OPENSUBDIV_EVAL_OUTPUT_CPU_H_
21 
23 
24 #include <opensubdiv/osd/cpuEvaluator.h>
25 #include <opensubdiv/osd/cpuPatchTable.h>
26 #include <opensubdiv/osd/cpuVertexBuffer.h>
27 
28 using OpenSubdiv::Far::StencilTable;
29 using OpenSubdiv::Osd::CpuEvaluator;
30 using OpenSubdiv::Osd::CpuVertexBuffer;
31 
32 namespace blender {
33 namespace opensubdiv {
34 
35 // NOTE: Define as a class instead of typedef to make it possible
36 // to have anonymous class in opensubdiv_evaluator_internal.h
37 class CpuEvalOutput : public VolatileEvalOutput<CpuVertexBuffer,
38  CpuVertexBuffer,
39  StencilTable,
40  CpuPatchTable,
41  CpuEvaluator> {
42  public:
43  CpuEvalOutput(const StencilTable *vertex_stencils,
44  const StencilTable *varying_stencils,
45  const vector<const StencilTable *> &all_face_varying_stencils,
46  const int face_varying_width,
47  const PatchTable *patch_table,
48  EvaluatorCache *evaluator_cache = NULL)
49  : VolatileEvalOutput<CpuVertexBuffer,
50  CpuVertexBuffer,
51  StencilTable,
52  CpuPatchTable,
53  CpuEvaluator>(vertex_stencils,
54  varying_stencils,
55  all_face_varying_stencils,
56  face_varying_width,
57  patch_table,
58  evaluator_cache)
59  {
60  }
61 };
62 
63 } // namespace opensubdiv
64 } // namespace blender
65 
66 #endif // OPENSUBDIV_EVAL_OUTPUT_CPU_H_
CpuEvalOutput(const StencilTable *vertex_stencils, const StencilTable *varying_stencils, const vector< const StencilTable * > &all_face_varying_stencils, const int face_varying_width, const PatchTable *patch_table, EvaluatorCache *evaluator_cache=NULL)