Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-04-17 07:17:24 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-17 07:21:24 +0300
commite12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch)
tree8cf3453d12edb177a218ef8009357518ec6cab6a /source/blender/bmesh/intern/bmesh_mesh.h
parentb3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (diff)
ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_mesh.h')
-rw-r--r--source/blender/bmesh/intern/bmesh_mesh.h125
1 files changed, 65 insertions, 60 deletions
diff --git a/source/blender/bmesh/intern/bmesh_mesh.h b/source/blender/bmesh/intern/bmesh_mesh.h
index 6f340411b00..d0cf50a7894 100644
--- a/source/blender/bmesh/intern/bmesh_mesh.h
+++ b/source/blender/bmesh/intern/bmesh_mesh.h
@@ -25,31 +25,39 @@ struct BMAllocTemplate;
struct BMLoopNorEditDataArray;
struct MLoopNorSpaceArray;
-void BM_mesh_elem_toolflags_ensure(BMesh *bm);
-void BM_mesh_elem_toolflags_clear(BMesh *bm);
+void BM_mesh_elem_toolflags_ensure(BMesh *bm);
+void BM_mesh_elem_toolflags_clear(BMesh *bm);
struct BMeshCreateParams {
- uint use_toolflags : 1;
+ uint use_toolflags : 1;
};
-BMesh *BM_mesh_create(
- const struct BMAllocTemplate *allocsize,
- const struct BMeshCreateParams *params);
+BMesh *BM_mesh_create(const struct BMAllocTemplate *allocsize,
+ const struct BMeshCreateParams *params);
-void BM_mesh_free(BMesh *bm);
-void BM_mesh_data_free(BMesh *bm);
-void BM_mesh_clear(BMesh *bm);
+void BM_mesh_free(BMesh *bm);
+void BM_mesh_data_free(BMesh *bm);
+void BM_mesh_clear(BMesh *bm);
void BM_mesh_normals_update(BMesh *bm);
-void BM_verts_calc_normal_vcos(BMesh *bm, const float (*fnos)[3], const float (*vcos)[3], float (*vnos)[3]);
-void BM_loops_calc_normal_vcos(
- BMesh *bm, const float(*vcos)[3], const float(*vnos)[3], const float(*pnos)[3],
- const bool use_split_normals, const float split_angle, float(*r_lnos)[3],
- struct MLoopNorSpaceArray *r_lnors_spacearr, short(*clnors_data)[2],
- const int cd_loop_clnors_offset, const bool do_rebuild);
+void BM_verts_calc_normal_vcos(BMesh *bm,
+ const float (*fnos)[3],
+ const float (*vcos)[3],
+ float (*vnos)[3]);
+void BM_loops_calc_normal_vcos(BMesh *bm,
+ const float (*vcos)[3],
+ const float (*vnos)[3],
+ const float (*pnos)[3],
+ const bool use_split_normals,
+ const float split_angle,
+ float (*r_lnos)[3],
+ struct MLoopNorSpaceArray *r_lnors_spacearr,
+ short (*clnors_data)[2],
+ const int cd_loop_clnors_offset,
+ const bool do_rebuild);
bool BM_loop_check_cyclic_smooth_fan(BMLoop *l_curr);
-void BM_lnorspacearr_store(BMesh *bm, float(*r_lnors)[3]);
+void BM_lnorspacearr_store(BMesh *bm, float (*r_lnors)[3]);
void BM_lnorspace_invalidate(BMesh *bm, const bool do_invalidate_all);
void BM_lnorspace_rebuild(BMesh *bm, bool preserve_clnor);
void BM_lnorspace_update(BMesh *bm);
@@ -63,7 +71,6 @@ struct BMLoopNorEditDataArray *BM_loop_normal_editdata_array_init(BMesh *bm);
void BM_loop_normal_editdata_array_free(struct BMLoopNorEditDataArray *lnors_ed_arr);
int BM_total_loop_select(BMesh *bm);
-
void BM_edges_sharp_from_angle_set(BMesh *bm, const float split_angle);
void bmesh_edit_begin(BMesh *bm, const BMOpTypeFlag type_flag);
@@ -72,8 +79,7 @@ void bmesh_edit_end(BMesh *bm, const BMOpTypeFlag type_flag);
void BM_mesh_elem_index_ensure_ex(BMesh *bm, const char htype, int elem_offset[4]);
void BM_mesh_elem_index_ensure(BMesh *bm, const char hflag);
void BM_mesh_elem_index_validate(
- BMesh *bm, const char *location, const char *func,
- const char *msg_a, const char *msg_b);
+ BMesh *bm, const char *location, const char *func, const char *msg_a, const char *msg_b);
void BM_mesh_toolflags_set(BMesh *bm, bool use_toolflags);
@@ -81,27 +87,27 @@ void BM_mesh_toolflags_set(BMesh *bm, bool use_toolflags);
bool BM_mesh_elem_table_check(BMesh *bm);
#endif
-void BM_mesh_elem_table_ensure(BMesh *bm, const char htype);
-void BM_mesh_elem_table_init(BMesh *bm, const char htype);
-void BM_mesh_elem_table_free(BMesh *bm, const char htype);
+void BM_mesh_elem_table_ensure(BMesh *bm, const char htype);
+void BM_mesh_elem_table_init(BMesh *bm, const char htype);
+void BM_mesh_elem_table_free(BMesh *bm, const char htype);
BLI_INLINE BMVert *BM_vert_at_index(BMesh *bm, const int index)
{
- BLI_assert((index >= 0) && (index < bm->totvert));
- BLI_assert((bm->elem_table_dirty & BM_VERT) == 0);
- return bm->vtable[index];
+ BLI_assert((index >= 0) && (index < bm->totvert));
+ BLI_assert((bm->elem_table_dirty & BM_VERT) == 0);
+ return bm->vtable[index];
}
BLI_INLINE BMEdge *BM_edge_at_index(BMesh *bm, const int index)
{
- BLI_assert((index >= 0) && (index < bm->totedge));
- BLI_assert((bm->elem_table_dirty & BM_EDGE) == 0);
- return bm->etable[index];
+ BLI_assert((index >= 0) && (index < bm->totedge));
+ BLI_assert((bm->elem_table_dirty & BM_EDGE) == 0);
+ return bm->etable[index];
}
BLI_INLINE BMFace *BM_face_at_index(BMesh *bm, const int index)
{
- BLI_assert((index >= 0) && (index < bm->totface));
- BLI_assert((bm->elem_table_dirty & BM_FACE) == 0);
- return bm->ftable[index];
+ BLI_assert((index >= 0) && (index < bm->totface));
+ BLI_assert((bm->elem_table_dirty & BM_FACE) == 0);
+ return bm->ftable[index];
}
BMVert *BM_vert_at_index_find(BMesh *bm, const int index);
@@ -114,43 +120,42 @@ BMFace *BM_face_at_index_find_or_table(BMesh *bm, const int index);
// XXX
-int BM_mesh_elem_count(BMesh *bm, const char htype);
+int BM_mesh_elem_count(BMesh *bm, const char htype);
-void BM_mesh_remap(
- BMesh *bm,
- const uint *vert_idx,
- const uint *edge_idx,
- const uint *face_idx);
+void BM_mesh_remap(BMesh *bm, const uint *vert_idx, const uint *edge_idx, const uint *face_idx);
-void BM_mesh_rebuild(
- BMesh *bm, const struct BMeshCreateParams *params,
- struct BLI_mempool *vpool, struct BLI_mempool *epool, struct BLI_mempool *lpool, struct BLI_mempool *fpool);
+void BM_mesh_rebuild(BMesh *bm,
+ const struct BMeshCreateParams *params,
+ struct BLI_mempool *vpool,
+ struct BLI_mempool *epool,
+ struct BLI_mempool *lpool,
+ struct BLI_mempool *fpool);
typedef struct BMAllocTemplate {
- int totvert, totedge, totloop, totface;
+ int totvert, totedge, totloop, totface;
} BMAllocTemplate;
extern const BMAllocTemplate bm_mesh_allocsize_default;
extern const BMAllocTemplate bm_mesh_chunksize_default;
-#define BMALLOC_TEMPLATE_FROM_BM(bm) { (CHECK_TYPE_INLINE(bm, BMesh *), \
- (bm)->totvert), (bm)->totedge, (bm)->totloop, (bm)->totface}
-
-#define _VA_BMALLOC_TEMPLATE_FROM_ME_1(me) { \
- (CHECK_TYPE_INLINE(me, Mesh *), \
- (me)->totvert), \
- (me)->totedge, \
- (me)->totloop, \
- (me)->totpoly, \
-}
-#define _VA_BMALLOC_TEMPLATE_FROM_ME_2(me_a, me_b) { \
- (CHECK_TYPE_INLINE(me_a, Mesh *), \
- CHECK_TYPE_INLINE(me_b, Mesh *), \
- (me_a)->totvert + (me_b)->totvert), \
- (me_a)->totedge + (me_b)->totedge, \
- (me_a)->totloop + (me_b)->totloop, \
- (me_a)->totpoly + (me_b)->totpoly, \
-}
-#define BMALLOC_TEMPLATE_FROM_ME(...) VA_NARGS_CALL_OVERLOAD(_VA_BMALLOC_TEMPLATE_FROM_ME_, __VA_ARGS__)
+#define BMALLOC_TEMPLATE_FROM_BM(bm) \
+ { \
+ (CHECK_TYPE_INLINE(bm, BMesh *), (bm)->totvert), (bm)->totedge, (bm)->totloop, (bm)->totface \
+ }
+
+#define _VA_BMALLOC_TEMPLATE_FROM_ME_1(me) \
+ { \
+ (CHECK_TYPE_INLINE(me, Mesh *), (me)->totvert), (me)->totedge, (me)->totloop, (me)->totpoly, \
+ }
+#define _VA_BMALLOC_TEMPLATE_FROM_ME_2(me_a, me_b) \
+ { \
+ (CHECK_TYPE_INLINE(me_a, Mesh *), \
+ CHECK_TYPE_INLINE(me_b, Mesh *), \
+ (me_a)->totvert + (me_b)->totvert), \
+ (me_a)->totedge + (me_b)->totedge, (me_a)->totloop + (me_b)->totloop, \
+ (me_a)->totpoly + (me_b)->totpoly, \
+ }
+#define BMALLOC_TEMPLATE_FROM_ME(...) \
+ VA_NARGS_CALL_OVERLOAD(_VA_BMALLOC_TEMPLATE_FROM_ME_, __VA_ARGS__)
#endif /* __BMESH_MESH_H__ */