Blender V4.3
cubes.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2009-2022 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#ifndef __CUBES_H__
6#define __CUBES_H__
7
9
10/* simple wrapper for auto-generated marching cubes data */
11class Cubes {
12 public:
14 int getNumTriangle(int mask)
15 {
17 }
18
20 void getTriangle(int mask, int index, int indices[3])
21 {
22 for (int i = 0; i < 3; i++) {
23 indices[i] = marching_cubes_tris[mask][index][i];
24 }
25 }
26
27#ifdef WITH_CXX_GUARDEDALLOC
28 MEM_CXX_CLASS_ALLOC_FUNCS("DUALCON:Cubes")
29#endif
30};
31
32#endif /* __CUBES_H__ */
Definition cubes.h:11
int getNumTriangle(int mask)
Get number of triangles.
Definition cubes.h:14
void getTriangle(int mask, int index, int indices[3])
Get a triangle.
Definition cubes.h:20
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)