Blender  V3.3
BKE_mball.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2001-2002 NaN Holding BV. All rights reserved. */
3 #pragma once
4 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13 struct Base;
14 struct BoundBox;
15 struct Depsgraph;
16 struct Main;
17 struct MetaBall;
18 struct MetaElem;
19 struct Object;
20 struct Scene;
21 
22 struct MetaBall *BKE_mball_add(struct Main *bmain, const char *name);
23 
24 bool BKE_mball_is_any_selected(const struct MetaBall *mb);
25 bool BKE_mball_is_any_selected_multi(struct Base **bases, int bases_len);
26 bool BKE_mball_is_any_unselected(const struct MetaBall *mb);
27 
33 bool BKE_mball_is_same_group(const struct Object *ob1, const struct Object *ob2);
38 bool BKE_mball_is_basis_for(const struct Object *ob1, const struct Object *ob2);
45 bool BKE_mball_is_basis(const struct Object *ob);
55 struct Object *BKE_mball_basis_find(struct Scene *scene, struct Object *ob);
56 
64 void BKE_mball_texspace_calc(struct Object *ob);
68 struct BoundBox *BKE_mball_boundbox_get(struct Object *ob);
69 float *BKE_mball_make_orco(struct Object *ob, struct ListBase *dispbase);
70 
80 void BKE_mball_properties_copy(struct Main *bmain, struct MetaBall *active_metaball);
81 
83  const struct MetaBall *mb, float min[3], float max[3], const float obmat[4][4], short flag);
84 
85 /* Basic vertex data functions. */
86 
87 bool BKE_mball_minmax(const struct MetaBall *mb, float min[3], float max[3]);
88 bool BKE_mball_center_median(const struct MetaBall *mb, float r_cent[3]);
89 bool BKE_mball_center_bounds(const struct MetaBall *mb, float r_cent[3]);
90 void BKE_mball_transform(struct MetaBall *mb, const float mat[4][4], bool do_props);
91 void BKE_mball_translate(struct MetaBall *mb, const float offset[3]);
92 
98 struct MetaElem *BKE_mball_element_add(struct MetaBall *mb, int type);
99 
100 /* *** select funcs *** */
101 
102 int BKE_mball_select_count(const struct MetaBall *mb);
103 int BKE_mball_select_count_multi(struct Base **bases, int bases_len);
104 bool BKE_mball_select_all(struct MetaBall *mb);
105 bool BKE_mball_select_all_multi_ex(struct Base **bases, int bases_len);
106 bool BKE_mball_deselect_all(struct MetaBall *mb);
107 bool BKE_mball_deselect_all_multi_ex(struct Base **bases, int bases_len);
108 bool BKE_mball_select_swap(struct MetaBall *mb);
109 bool BKE_mball_select_swap_multi_ex(struct Base **bases, int bases_len);
110 
111 /* **** Depsgraph evaluation **** */
112 
113 struct Depsgraph;
114 
115 /* Draw Cache */
116 
117 enum {
119 };
120 void BKE_mball_batch_cache_dirty_tag(struct MetaBall *mb, int mode);
121 void BKE_mball_batch_cache_free(struct MetaBall *mb);
122 
123 extern void (*BKE_mball_batch_cache_dirty_tag_cb)(struct MetaBall *mb, int mode);
124 extern void (*BKE_mball_batch_cache_free_cb)(struct MetaBall *mb);
125 
126 #ifdef __cplusplus
127 }
128 #endif
bool BKE_mball_is_basis_for(const struct Object *ob1, const struct Object *ob2)
struct MetaElem * BKE_mball_element_add(struct MetaBall *mb, int type)
Definition: mball.c:209
bool BKE_mball_center_median(const struct MetaBall *mb, float r_cent[3])
bool BKE_mball_minmax(const struct MetaBall *mb, float min[3], float max[3])
void BKE_mball_transform(struct MetaBall *mb, const float mat[4][4], bool do_props)
Definition: mball.c:613
@ BKE_MBALL_BATCH_DIRTY_ALL
Definition: BKE_mball.h:118
struct MetaBall * BKE_mball_add(struct Main *bmain, const char *name)
Definition: mball.c:200
bool BKE_mball_select_swap(struct MetaBall *mb)
Definition: mball.c:715
bool BKE_mball_is_same_group(const struct Object *ob1, const struct Object *ob2)
void BKE_mball_translate(struct MetaBall *mb, const float offset[3])
Definition: mball.c:639
bool BKE_mball_deselect_all(struct MetaBall *mb)
Definition: mball.c:691
void BKE_mball_properties_copy(struct Main *bmain, struct MetaBall *active_metaball)
Definition: mball.c:435
bool BKE_mball_minmax_ex(const struct MetaBall *mb, float min[3], float max[3], const float obmat[4][4], short flag)
struct Object * BKE_mball_basis_find(struct Scene *scene, struct Object *ob)
Definition: mball.c:508
int BKE_mball_select_count_multi(struct Base **bases, int bases_len)
Definition: mball.c:657
void BKE_mball_batch_cache_dirty_tag(struct MetaBall *mb, int mode)
Definition: mball.c:743
void(* BKE_mball_batch_cache_dirty_tag_cb)(struct MetaBall *mb, int mode)
Definition: mball.c:740
bool BKE_mball_is_any_selected(const struct MetaBall *mb)
bool BKE_mball_select_all(struct MetaBall *mb)
Definition: mball.c:668
void(* BKE_mball_batch_cache_free_cb)(struct MetaBall *mb)
Definition: mball.c:741
bool BKE_mball_deselect_all_multi_ex(struct Base **bases, int bases_len)
Definition: mball.c:703
bool BKE_mball_is_basis(const struct Object *ob)
struct BoundBox * BKE_mball_boundbox_get(struct Object *ob)
Definition: mball.c:298
bool BKE_mball_select_swap_multi_ex(struct Base **bases, int bases_len)
Definition: mball.c:725
bool BKE_mball_center_bounds(const struct MetaBall *mb, float r_cent[3])
float * BKE_mball_make_orco(struct Object *ob, struct ListBase *dispbase)
Definition: mball.c:315
void BKE_mball_texspace_calc(struct Object *ob)
Definition: mball.c:255
bool BKE_mball_is_any_selected_multi(struct Base **bases, int bases_len)
Definition: mball.c:404
bool BKE_mball_is_any_unselected(const struct MetaBall *mb)
bool BKE_mball_select_all_multi_ex(struct Base **bases, int bases_len)
Definition: mball.c:680
void BKE_mball_batch_cache_free(struct MetaBall *mb)
Definition: mball.c:749
int BKE_mball_select_count(const struct MetaBall *mb)
struct Depsgraph Depsgraph
Definition: DEG_depsgraph.h:35
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
Scene scene
SyclQueue void void size_t num_bytes void
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
#define min(a, b)
Definition: sort.c:35
Definition: BKE_main.h:121
float max