Blender
V2.93
intern
cycles
subd
subd_patch_table.h
Go to the documentation of this file.
1
/*
2
* Copyright 2011-2016 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 __SUBD_PATCH_TABLE_H__
18
#define __SUBD_PATCH_TABLE_H__
19
20
#include "
util/util_array.h
"
21
#include "
util/util_types.h
"
22
23
#ifdef WITH_OPENSUBDIV
24
# ifdef _MSC_VER
25
# include "iso646.h"
26
# endif
27
28
# include <opensubdiv/far/patchTable.h>
29
#endif
30
31
CCL_NAMESPACE_BEGIN
32
33
#ifdef WITH_OPENSUBDIV
34
using namespace
OpenSubdiv
;
35
#else
36
/* forward declare for when OpenSubdiv is unavailable */
37
namespace
Far
{
38
struct
PatchTable;
39
}
40
#endif
41
42
#define PATCH_ARRAY_SIZE 4
43
#define PATCH_PARAM_SIZE 2
44
#define PATCH_HANDLE_SIZE 3
45
#define PATCH_NODE_SIZE 1
46
47
struct
PackedPatchTable
{
48
array<uint>
table
;
49
50
size_t
num_arrays
;
51
size_t
num_indices
;
52
size_t
num_patches
;
53
size_t
num_nodes
;
54
55
/* calculated size from num_* members */
56
size_t
total_size();
57
58
void
pack(Far::PatchTable *patch_table,
int
offset = 0);
59
void
copy_adjusting_offsets(
uint
*dest,
int
doffset);
60
};
61
62
CCL_NAMESPACE_END
63
64
#endif
/* __SUBD_PATCH_TABLE_H__ */
uint
unsigned int uint
Definition:
BLI_sys_types.h:83
array< uint >
CCL_NAMESPACE_END
#define CCL_NAMESPACE_END
Definition:
kernel_compat_cuda.h:23
CCL_NAMESPACE_BEGIN
Definition:
blender_python.cpp:54
Far
Definition:
subd_patch_table.h:37
OpenSubdiv
Definition:
topology_refiner_factory.cc:47
PackedPatchTable
Definition:
subd_patch_table.h:47
PackedPatchTable::num_patches
size_t num_patches
Definition:
subd_patch_table.h:52
PackedPatchTable::num_nodes
size_t num_nodes
Definition:
subd_patch_table.h:53
PackedPatchTable::num_arrays
size_t num_arrays
Definition:
subd_patch_table.h:50
PackedPatchTable::table
array< uint > table
Definition:
subd_patch_table.h:48
PackedPatchTable::num_indices
size_t num_indices
Definition:
subd_patch_table.h:51
util_array.h
util_types.h
Generated on Tue Jan 31 2023 14:37:24 for Blender by
doxygen
1.9.1