Blender
V4.3
intern
cycles
subd
subd/patch.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_H__
6
#define __SUBD_PATCH_H__
7
8
#include "
util/boundbox.h
"
9
#include "
util/types.h
"
10
11
CCL_NAMESPACE_BEGIN
12
13
class
Patch
{
14
public
:
15
Patch
() :
patch_index
(0), shader(0),
from_ngon
(
false
) {}
16
17
virtual
~Patch
() =
default
;
18
19
virtual
void
eval
(
float3
*
P
,
float3
*dPdu,
float3
*dPdv,
float3
*
N
,
float
u,
float
v
) = 0;
20
21
int
patch_index
;
22
int
shader
;
23
bool
from_ngon
;
24
};
25
26
/* Linear Quad Patch */
27
28
class
LinearQuadPatch
:
public
Patch
{
29
public
:
30
float3
hull
[4];
31
float3
normals[4];
32
33
void
eval
(
float3
*
P
,
float3
*dPdu,
float3
*dPdv,
float3
*
N
,
float
u,
float
v
);
34
BoundBox
bound
();
35
};
36
37
/* Bicubic Patch */
38
39
class
BicubicPatch
:
public
Patch
{
40
public
:
41
float3
hull
[16];
42
43
void
eval
(
float3
*
P
,
float3
*dPdu,
float3
*dPdv,
float3
*
N
,
float
u,
float
v
);
44
BoundBox
bound
();
45
};
46
47
CCL_NAMESPACE_END
48
49
#endif
/* __SUBD_PATCH_H__ */
v
ATTR_WARN_UNUSED_RESULT const BMVert * v
Definition
bmesh_query_inline.hh:17
boundbox.h
BicubicPatch
Definition
subd/patch.h:39
BicubicPatch::bound
BoundBox bound()
Definition
patch.cpp:102
BicubicPatch::hull
float3 hull[16]
Definition
subd/patch.h:41
BicubicPatch::eval
void eval(float3 *P, float3 *dPdu, float3 *dPdv, float3 *N, float u, float v)
Definition
patch.cpp:84
LinearQuadPatch
Definition
subd/patch.h:28
LinearQuadPatch::hull
float3 hull[4]
Definition
subd/patch.h:30
LinearQuadPatch::bound
BoundBox bound()
Definition
patch.cpp:71
LinearQuadPatch::eval
void eval(float3 *P, float3 *dPdu, float3 *dPdv, float3 *N, float u, float v)
Definition
patch.cpp:53
Patch
Definition
subd/patch.h:13
Patch::shader
int shader
Definition
subd/patch.h:22
Patch::from_ngon
bool from_ngon
Definition
subd/patch.h:23
Patch::patch_index
int patch_index
Definition
subd/patch.h:21
Patch::Patch
Patch()
Definition
subd/patch.h:15
Patch::eval
virtual void eval(float3 *P, float3 *dPdu, float3 *dPdv, float3 *N, float u, float v)=0
Patch::~Patch
virtual ~Patch()=default
CCL_NAMESPACE_END
#define CCL_NAMESPACE_END
Definition
device/cuda/compat.h:10
false
false
Definition
eevee_depth_of_field_info.hh:134
N
#define N
Definition
mball_tessellate.cc:274
CCL_NAMESPACE_BEGIN
Definition
python.cpp:44
BoundBox
Definition
DNA_object_types.h:103
float3
Definition
sky_float3.h:26
types.h
P
#define P
Definition
uvedit_clipboard_graph_iso.cc:24
Generated on Thu Feb 6 2025 07:36:39 for Blender by
doxygen
1.11.0