Blender
V2.93
source
blender
makesdna
DNA_hair_types.h
Go to the documentation of this file.
1
/*
2
* This program is free software; you can redistribute it and/or
3
* modify it under the terms of the GNU General Public License
4
* as published by the Free Software Foundation; either version 2
5
* of the License, or (at your option) any later version.
6
*
7
* This program is distributed in the hope that it will be useful,
8
* but WITHOUT ANY WARRANTY; without even the implied warranty of
9
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
* GNU General Public License for more details.
11
*
12
* You should have received a copy of the GNU General Public License
13
* along with this program; if not, write to the Free Software Foundation,
14
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15
*/
16
21
#pragma once
22
23
#include "
DNA_ID.h
"
24
#include "
DNA_customdata_types.h
"
25
26
#ifdef __cplusplus
27
extern
"C"
{
28
#endif
29
30
typedef
struct
HairCurve
{
31
/* Index of first point of hair curve. */
32
int
firstpoint
;
33
/* Number of points in hair curve, must be 2 or higher. */
34
int
numpoints
;
35
}
HairCurve
;
36
37
/* Hair attachment to a mesh.
38
* TODO: attach to tessellated triangles or polygons?
39
* TODO: what type of interpolation to use for uv? */
40
typedef
struct
HairMapping
{
41
float
uv
[2];
42
int
poly
;
43
}
HairMapping
;
44
45
typedef
struct
Hair
{
46
ID
id
;
47
struct
AnimData
*
adt
;
/* animation data (must be immediately after id) */
48
49
int
flag
;
50
int
_pad1
[1];
51
52
/* Geometry */
53
float
(*
co
)[3];
54
float
*
radius
;
55
struct
HairCurve
*
curves
;
56
struct
HairMaping *
mapping
;
57
int
totpoint
;
58
int
totcurve
;
59
60
/* Custom Data */
61
struct
CustomData
pdata
;
62
struct
CustomData
cdata
;
63
int
attributes_active_index
;
64
int
_pad3
;
65
66
/* Material */
67
struct
Material
**
mat
;
68
short
totcol
;
69
short
_pad2
[3];
70
71
/* Draw Cache */
72
void
*
batch_cache
;
73
}
Hair
;
74
75
/* Hair.flag */
76
enum
{
77
HA_DS_EXPAND
= (1 << 0),
78
};
79
80
/* Only one material supported currently. */
81
#define HAIR_MATERIAL_NR 1
82
83
#ifdef __cplusplus
84
}
85
#endif
float
typedef float(TangentPoint)[2]
DNA_ID.h
ID and Library types, which are fundamental for sdna.
DNA_customdata_types.h
HairMapping
struct HairMapping HairMapping
HA_DS_EXPAND
@ HA_DS_EXPAND
Definition:
DNA_hair_types.h:77
HairCurve
struct HairCurve HairCurve
Hair
struct Hair Hair
AnimData
Definition:
DNA_anim_types.h:1083
CustomData
Definition:
DNA_customdata_types.h:70
HairCurve
Definition:
DNA_hair_types.h:30
HairCurve::firstpoint
int firstpoint
Definition:
DNA_hair_types.h:32
HairCurve::numpoints
int numpoints
Definition:
DNA_hair_types.h:34
HairMapping
Definition:
DNA_hair_types.h:40
HairMapping::poly
int poly
Definition:
DNA_hair_types.h:42
HairMapping::uv
float uv[2]
Definition:
DNA_hair_types.h:41
Hair
Definition:
DNA_hair_types.h:45
Hair::mat
struct Material ** mat
Definition:
DNA_hair_types.h:67
Hair::pdata
struct CustomData pdata
Definition:
DNA_hair_types.h:61
Hair::co
float(* co)[3]
Definition:
DNA_hair_types.h:53
Hair::totcurve
int totcurve
Definition:
DNA_hair_types.h:58
Hair::flag
int flag
Definition:
DNA_hair_types.h:49
Hair::attributes_active_index
int attributes_active_index
Definition:
DNA_hair_types.h:63
Hair::id
ID id
Definition:
DNA_hair_types.h:46
Hair::curves
struct HairCurve * curves
Definition:
DNA_hair_types.h:55
Hair::radius
float * radius
Definition:
DNA_hair_types.h:54
Hair::mapping
struct HairMaping * mapping
Definition:
DNA_hair_types.h:56
Hair::totcol
short totcol
Definition:
DNA_hair_types.h:68
Hair::_pad1
int _pad1[1]
Definition:
DNA_hair_types.h:50
Hair::_pad3
int _pad3
Definition:
DNA_hair_types.h:64
Hair::adt
struct AnimData * adt
Definition:
DNA_hair_types.h:47
Hair::totpoint
int totpoint
Definition:
DNA_hair_types.h:57
Hair::_pad2
short _pad2[3]
Definition:
DNA_hair_types.h:69
Hair::batch_cache
void * batch_cache
Definition:
DNA_hair_types.h:72
Hair::cdata
struct CustomData cdata
Definition:
DNA_hair_types.h:62
ID
Definition:
DNA_ID.h:273
Material
Definition:
DNA_material_types.h:158
Generated on Tue Jan 31 2023 14:37:24 for Blender by
doxygen
1.9.1