Blender
V5.3
intern
cycles
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
#pragma once
6
7
#include "
util/boundbox.h
"
8
#include "
util/types.h
"
9
10
CCL_NAMESPACE_BEGIN
11
12
class
Patch
{
13
public
:
14
Patch
() =
default
;
15
virtual
~Patch
() =
default
;
16
17
virtual
void
eval
(
18
float3
*
P
,
float3
*dPdu,
float3
*dPdv,
float3
*
N
,
const
float
u,
float
v)
const
= 0;
19
20
int
patch_index
= 0;
21
int
shader
= 0;
22
bool
smooth
=
true
;
23
bool
from_ngon
=
false
;
24
};
25
26
/* Linear Quad Patch */
27
28
class
LinearQuadPatch
final
:
public
Patch
{
29
public
:
30
float3
hull
[4];
31
32
void
eval
(
33
float3
*
P
,
float3
*dPdu,
float3
*dPdv,
float3
*
N
,
const
float
u,
float
v)
const override
;
34
BoundBox
bound
();
35
};
36
37
/* Bicubic Patch */
38
39
class
BicubicPatch
final
:
public
Patch
{
40
public
:
41
float3
hull
[16];
42
43
void
eval
(
44
float3
*
P
,
float3
*dPdu,
float3
*dPdv,
float3
*
N
,
const
float
u,
float
v)
const override
;
45
BoundBox
bound
();
46
};
47
48
CCL_NAMESPACE_END
final
#define final(a, b, c)
Definition
BLI_hash_c.hh:21
boundbox.h
BicubicPatch
Definition
patch.h:39
BicubicPatch::bound
BoundBox bound()
Definition
patch.cpp:108
BicubicPatch::hull
float3 hull[16]
Definition
patch.h:41
BicubicPatch::eval
void eval(float3 *P, float3 *dPdu, float3 *dPdv, float3 *N, const float u, float v) const override
Definition
patch.cpp:88
BoundBox
Definition
boundbox.h:18
LinearQuadPatch
Definition
patch.h:28
LinearQuadPatch::hull
float3 hull[4]
Definition
patch.h:30
LinearQuadPatch::eval
void eval(float3 *P, float3 *dPdu, float3 *dPdv, float3 *N, const float u, float v) const override
Definition
patch.cpp:52
LinearQuadPatch::bound
BoundBox bound()
Definition
patch.cpp:75
Patch::eval
virtual void eval(float3 *P, float3 *dPdu, float3 *dPdv, float3 *N, const float u, float v) const =0
Patch::shader
int shader
Definition
patch.h:21
Patch::smooth
bool smooth
Definition
patch.h:22
Patch::from_ngon
bool from_ngon
Definition
patch.h:23
Patch::patch_index
int patch_index
Definition
patch.h:20
Patch::~Patch
virtual ~Patch()=default
Patch::Patch
Patch()=default
CCL_NAMESPACE_END
#define CCL_NAMESPACE_END
Definition
device/cuda/compat.h:10
N
#define N
Definition
mball_tessellate.cc:278
CCL_NAMESPACE_BEGIN
Definition
python.cpp:41
float3
Definition
sky_math.h:135
types.h
P
#define P
Definition
uvedit_clipboard_graph_iso.cc:30
Generated on
for Blender by
doxygen
1.18.0