Blender V4.3
patch_table.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2011-2022 Blender Foundation
2 *
3 * SPDX-License-Identifier: Apache-2.0 */
4
5#ifndef __SUBD_PATCH_TABLE_H__
6#define __SUBD_PATCH_TABLE_H__
7
8#include "util/array.h"
9#include "util/types.h"
10
11#ifdef WITH_OPENSUBDIV
12# ifdef _MSC_VER
13# include "iso646.h"
14# endif
15
16# include <opensubdiv/far/patchTable.h>
17#endif
18
20
21#ifdef WITH_OPENSUBDIV
22using namespace OpenSubdiv;
23#else
24/* forward declare for when OpenSubdiv is unavailable */
25namespace Far {
26struct PatchTable;
27}
28#endif
29
30#define PATCH_ARRAY_SIZE 4
31#define PATCH_PARAM_SIZE 2
32#define PATCH_HANDLE_SIZE 3
33#define PATCH_NODE_SIZE 1
34
37
38 size_t num_arrays;
41 size_t num_nodes;
42
43 /* calculated size from num_* members */
44 size_t total_size();
45
46 void pack(Far::PatchTable *patch_table, int offset = 0);
47 void copy_adjusting_offsets(uint *dest, int doffset);
48};
49
51
52#endif /* __SUBD_PATCH_TABLE_H__ */
unsigned int uint
#define CCL_NAMESPACE_END
void pack(Far::PatchTable *patch_table, int offset=0)
void copy_adjusting_offsets(uint *dest, int doffset)
array< uint > table
Definition patch_table.h:36