Blender
V4.3
intern
cycles
subd
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
19
CCL_NAMESPACE_BEGIN
20
21
#ifdef WITH_OPENSUBDIV
22
using namespace
OpenSubdiv
;
23
#else
24
/* forward declare for when OpenSubdiv is unavailable */
25
namespace
Far
{
26
struct
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
35
struct
PackedPatchTable
{
36
array<uint>
table
;
37
38
size_t
num_arrays
;
39
size_t
num_indices
;
40
size_t
num_patches
;
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
50
CCL_NAMESPACE_END
51
52
#endif
/* __SUBD_PATCH_TABLE_H__ */
uint
unsigned int uint
Definition
BLI_sys_types.h:68
array
Definition
cycles/util/array.h:25
array.h
CCL_NAMESPACE_END
#define CCL_NAMESPACE_END
Definition
device/cuda/compat.h:10
CCL_NAMESPACE_BEGIN
Definition
python.cpp:44
Far
Definition
patch_table.h:25
OpenSubdiv
Definition
gl_compute_evaluator.h:13
PackedPatchTable
Definition
patch_table.h:35
PackedPatchTable::pack
void pack(Far::PatchTable *patch_table, int offset=0)
Definition
patch_table.cpp:179
PackedPatchTable::num_patches
size_t num_patches
Definition
patch_table.h:40
PackedPatchTable::total_size
size_t total_size()
Definition
patch_table.cpp:173
PackedPatchTable::num_nodes
size_t num_nodes
Definition
patch_table.h:41
PackedPatchTable::num_arrays
size_t num_arrays
Definition
patch_table.h:38
PackedPatchTable::copy_adjusting_offsets
void copy_adjusting_offsets(uint *dest, int doffset)
Definition
patch_table.cpp:241
PackedPatchTable::table
array< uint > table
Definition
patch_table.h:36
PackedPatchTable::num_indices
size_t num_indices
Definition
patch_table.h:39
types.h
Generated on Thu Feb 6 2025 07:36:39 for Blender by
doxygen
1.11.0