Blender
V3.3
intern
cycles
subd
subd/patch.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: Apache-2.0
2
* Copyright 2011-2022 Blender Foundation */
3
4
#ifndef __SUBD_PATCH_H__
5
#define __SUBD_PATCH_H__
6
7
#include "
util/boundbox.h
"
8
#include "
util/types.h
"
9
10
CCL_NAMESPACE_BEGIN
11
12
class
Patch
{
13
public
:
14
Patch
() :
patch_index
(0),
shader
(0),
from_ngon
(false)
15
{
16
}
17
18
virtual
~Patch
() =
default
;
19
20
virtual
void
eval
(
float3
*
P
,
float3
*dPdu,
float3
*dPdv,
float3
*
N
,
float
u,
float
v
) = 0;
21
22
int
patch_index
;
23
int
shader
;
24
bool
from_ngon
;
25
};
26
27
/* Linear Quad Patch */
28
29
class
LinearQuadPatch
:
public
Patch
{
30
public
:
31
float3
hull
[4];
32
float3
normals
[4];
33
34
void
eval
(
float3
*
P
,
float3
*dPdu,
float3
*dPdv,
float3
*
N
,
float
u,
float
v
);
35
BoundBox
bound
();
36
};
37
38
/* Bicubic Patch */
39
40
class
BicubicPatch
:
public
Patch
{
41
public
:
42
float3
hull
[16];
43
44
void
eval
(
float3
*
P
,
float3
*dPdu,
float3
*dPdv,
float3
*
N
,
float
u,
float
v
);
45
BoundBox
bound
();
46
};
47
48
CCL_NAMESPACE_END
49
50
#endif
/* __SUBD_PATCH_H__ */
v
ATTR_WARN_UNUSED_RESULT const BMVert * v
Definition:
bmesh_query_inline.h:15
boundbox.h
BicubicPatch
Definition:
subd/patch.h:40
BicubicPatch::bound
BoundBox bound()
Definition:
patch.cpp:98
BicubicPatch::hull
float3 hull[16]
Definition:
subd/patch.h:42
BicubicPatch::eval
void eval(float3 *P, float3 *dPdu, float3 *dPdv, float3 *N, float u, float v)
Definition:
patch.cpp:80
LinearQuadPatch
Definition:
subd/patch.h:29
LinearQuadPatch::hull
float3 hull[4]
Definition:
subd/patch.h:31
LinearQuadPatch::bound
BoundBox bound()
Definition:
patch.cpp:68
LinearQuadPatch::normals
float3 normals[4]
Definition:
subd/patch.h:32
LinearQuadPatch::eval
void eval(float3 *P, float3 *dPdu, float3 *dPdv, float3 *N, float u, float v)
Definition:
patch.cpp:50
Patch
Definition:
subd/patch.h:12
Patch::shader
int shader
Definition:
subd/patch.h:23
Patch::from_ngon
bool from_ngon
Definition:
subd/patch.h:24
Patch::patch_index
int patch_index
Definition:
subd/patch.h:22
Patch::Patch
Patch()
Definition:
subd/patch.h:14
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:
cuda/compat.h:9
P
static float P(float k)
Definition:
math_interp.c:25
N
#define N
Definition:
mball_tessellate.c:265
CCL_NAMESPACE_BEGIN
Definition:
python.cpp:37
BoundBox
Definition:
DNA_object_types.h:89
float3
Definition:
oneapi/compat.h:158
types.h
Generated on Sat Jul 27 2024 14:57:55 for Blender by
doxygen
1.9.1