Blender  V2.93
BKE_hair.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 
17 #pragma once
18 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 struct BoundBox;
28 struct CustomDataLayer;
29 struct Depsgraph;
30 struct Hair;
31 struct Main;
32 struct Object;
33 struct Scene;
34 
35 void *BKE_hair_add(struct Main *bmain, const char *name);
36 
37 struct BoundBox *BKE_hair_boundbox_get(struct Object *ob);
38 
39 void BKE_hair_update_customdata_pointers(struct Hair *hair);
40 bool BKE_hair_customdata_required(struct Hair *hair, struct CustomDataLayer *layer);
41 
42 /* Depsgraph */
43 
44 struct Hair *BKE_hair_new_for_eval(const struct Hair *hair_src, int totpoint, int totcurve);
45 struct Hair *BKE_hair_copy_for_eval(struct Hair *hair_src, bool reference);
46 
47 void BKE_hair_data_update(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *object);
48 
49 /* Draw Cache */
50 
51 enum {
53 };
54 
55 void BKE_hair_batch_cache_dirty_tag(struct Hair *hair, int mode);
56 void BKE_hair_batch_cache_free(struct Hair *hair);
57 
58 extern void (*BKE_hair_batch_cache_dirty_tag_cb)(struct Hair *hair, int mode);
59 extern void (*BKE_hair_batch_cache_free_cb)(struct Hair *hair);
60 
61 #ifdef __cplusplus
62 }
63 #endif
void * BKE_hair_add(struct Main *bmain, const char *name)
Definition: hair.c:250
void BKE_hair_data_update(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *object)
Definition: hair.c:395
struct Hair * BKE_hair_new_for_eval(const struct Hair *hair_src, int totpoint, int totcurve)
struct BoundBox * BKE_hair_boundbox_get(struct Object *ob)
Definition: hair.c:257
void BKE_hair_batch_cache_free(struct Hair *hair)
Definition: hair.c:420
void(* BKE_hair_batch_cache_free_cb)(struct Hair *hair)
Definition: hair.c:411
void BKE_hair_batch_cache_dirty_tag(struct Hair *hair, int mode)
Definition: hair.c:413
struct Hair * BKE_hair_copy_for_eval(struct Hair *hair_src, bool reference)
Definition: hair.c:321
void BKE_hair_update_customdata_pointers(struct Hair *hair)
Definition: hair.c:289
@ BKE_HAIR_BATCH_DIRTY_ALL
Definition: BKE_hair.h:52
bool BKE_hair_customdata_required(struct Hair *hair, struct CustomDataLayer *layer)
void(* BKE_hair_batch_cache_dirty_tag_cb)(struct Hair *hair, int mode)
Definition: hair.c:410
struct Depsgraph Depsgraph
Definition: DEG_depsgraph.h:51
Scene scene
const Depsgraph * depsgraph
int totcurve
int totpoint
Definition: BKE_main.h:116
string name
Definition: scene.h:222