Blender  V3.3
cubes.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #ifndef __CUBES_H__
4 #define __CUBES_H__
5 
6 #include "marching_cubes_table.h"
7 
8 /* simple wrapper for auto-generated marching cubes data */
9 class Cubes {
10  public:
13  {
15  }
16 
18  void getTriangle(int mask, int index, int indices[3])
19  {
20  for (int i = 0; i < 3; i++)
21  indices[i] = marching_cubes_tris[mask][index][i];
22  }
23 
24 #ifdef WITH_CXX_GUARDEDALLOC
25  MEM_CXX_CLASS_ALLOC_FUNCS("DUALCON:Cubes")
26 #endif
27 };
28 
29 #endif /* __CUBES_H__ */
Definition: cubes.h:9
int getNumTriangle(int mask)
Get number of triangles.
Definition: cubes.h:12
void getTriangle(int mask, int index, int indices[3])
Get a triangle.
Definition: cubes.h:18
ccl_gpu_kernel_postfix int ccl_global int * indices
const int marching_cubes_tris[TOTCONF][MAX_TRIS][3]
const int marching_cubes_numtri[TOTCONF]
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
Definition: math_float4.h:513