Blender  V2.93
coverage.h
Go to the documentation of this file.
1 /*
2  * Copyright 2018 Blender Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef __COVERAGE_H__
18 #define __COVERAGE_H__
19 
20 #include "util/util_map.h"
21 #include "util/util_vector.h"
22 
24 
25 struct KernelGlobals;
26 class RenderTile;
27 
28 typedef unordered_map<float, float> CoverageMap;
29 
30 class Coverage {
31  public:
32  Coverage(KernelGlobals *kg_, RenderTile &tile_) : kg(kg_), tile(tile_)
33  {
34  }
35  void init_path_trace();
36  void init_pixel(int x, int y);
37  void finalize();
38 
39  private:
40  vector<CoverageMap> coverage_object;
41  vector<CoverageMap> coverage_material;
42  vector<CoverageMap> coverage_asset;
43  KernelGlobals *kg;
44  RenderTile &tile;
45  void finalize_buffer(vector<CoverageMap> &coverage, const int pass_offset);
46  void flatten_buffer(vector<CoverageMap> &coverage, const int pass_offset);
47  void sort_buffer(const int pass_offset);
48 };
49 
51 
52 #endif /* __COVERAGE_H__ */
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
void init_pixel(int x, int y)
Definition: coverage.cpp:72
void finalize()
Definition: coverage.cpp:36
void init_path_trace()
Definition: coverage.cpp:52
Coverage(KernelGlobals *kg_, RenderTile &tile_)
Definition: coverage.h:32
unordered_map< float, float > CoverageMap
Definition: coverage.h:26
#define CCL_NAMESPACE_END