Commit Graph

38 Commits

Author SHA1 Message Date
91694b9b58 Code Style: use "#pragma once" in source directory
This replaces header include guards with `#pragma once`.
A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`),
because they are used in other places.

This patch has been generated by P1561 followed by `make format`.

Differential Revision: https://developer.blender.org/D8466
2020-08-07 09:50:34 +02:00
6f3e498e7d Cleanup: use of 'unsigned'
- Replace 'unsigned' used on it's own with 'uint'.
- Replace 'unsigned const char' with 'const uchar'.
2020-02-08 01:02:18 +11:00
333cdbb410 Cleanup: comment blocks 2019-04-18 07:59:28 +02:00
e12c08e8d1 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
2019-04-17 06:21:24 +02:00
de13d0a80c doxygen: add newline after \file
While \file doesn't need an argument, it can't have another doxy
command after it.
2019-02-18 08:22:12 +11:00
eef4077f18 Cleanup: remove redundant doxygen \file argument
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
2019-02-06 15:45:22 +11:00
65ec7ec524 Cleanup: remove redundant, invalid info from headers
BF-admins agree to remove header information that isn't useful,
to reduce noise.

- BEGIN/END license blocks

  Developers should add non license comments as separate comment blocks.
  No need for separator text.

- Contributors

  This is often invalid, outdated or misleading
  especially when splitting files.

  It's more useful to git-blame to find out who has developed the code.

See P901 for script to perform these edits.
2019-02-02 01:36:28 +11:00
ae57383648 Cleanup: comment blocks 2018-09-02 18:28:27 +10:00
b2c9fdfe87 Cleanup: rename BMesh count_ex -> count_at_most 2018-04-03 17:06:36 +02:00
393ba0cf16 Cleanup: multistatement-macros warning 2017-07-29 08:18:20 +10:00
89120cd241 bmesh: use 'uint' instead of 'unsigned int'
no functional changes.
2017-05-06 14:19:08 +10:00
e6d947f037 BMesh Intersect: use flags to keep track of verts
For simple cases bitmasks were OK, but didnt work for vert/edge, vert/edge tests.

Tag verts instead, makes logic easier to follow and gives minor speedup.
2016-06-29 16:09:58 +10:00
0d7d317755 BMesh: add checks for duplicates in a face
These could go un-noticed, causing errors later on.
2015-12-26 15:34:55 +11:00
690b90f1e2 BMesh: minor optimization counting adjacent data
add BM_***_count_is_over(), _count_is_equal()

Useful if we only want to know if the count is a smaller value.
2015-04-12 17:38:14 +10:00
48abc65c39 BMesh: new face splitting function BM_face_split_edgenet
This takes a face and an edge-net, splitting the face into regions
defined by the edge-net.
2014-07-11 10:29:53 +10:00
f4484daed3 Correct IS_EMPTY macro
also prevent reading from BM_ELEM_API_FLAG_ get/setters
2014-07-09 07:53:43 +10:00
b3972aeea0 Math Lib: optimize axis_dominant_v3_to_m3, approx 6x speedup
build the matrix directly rather then calculating with axis/angle

also remove unused function calc_poly_plane
2014-04-16 21:07:28 +10:00
4770848871 code cleanup: bmesh use 'const' for query functions. 2013-08-03 16:37:23 +00:00
6f9f1399a0 code cleanup: operator headers 2013-03-25 22:40:11 +00:00
cdc4037f0d bmesh: BM_verts_in_face was using bmesh operator flag which is no longer ensured to be available,
use internal apiflag instead, Thanks to Nicholas Bishop for spotting.

also quiet some warnings.
2012-11-19 00:54:55 +00:00
42ebc9bc80 bmesh: move internal API flags out of BMFlagLayer, into BMHeader which was being padded up anyway, added static assert to make sure it stays <=16 bytes. 2012-11-18 10:17:07 +00:00
77e351300b code cleanup: replace BM_DISK_EDGE_LINK_GET define with inline function, that checks for the vertex not matching either of the edges verts. 2012-09-12 05:11:38 +00:00
bd5fdf63cb fix [#31456] Extreme lag editing meshes
running BM_CHECK_ELEMENT was taking over 75% of the time to subdivide a mesh, since this only reports errors, and is so slow - only run this on non-release builds.
2012-09-12 04:53:49 +00:00
3d9d26d6bf fix [#31197] Limited dissolve leaves faces/edges/verts behind
bad bug where vertices could be in a face more then once (which isn't allowed), now check for this when creating a face.
2012-05-06 18:04:37 +00:00
933b3166fc style cleanup: guys - set your editors to tabs! 2012-05-01 17:51:03 +00:00
16ff7e40e6 code cleanup: change C naming convention (so py and C api match), eg:
C: BM_face_calc_area(f), Py: BMFace.calc_area()
2012-04-23 01:19:50 +00:00
b40476455e code cleanup: remove unused BMesh args. 2012-04-19 14:38:09 +00:00
c1e475e527 code cleanup:
- remove unused vars
- no need to hard code version number for collada.
- cleanup some typos in comments.
- movieclip_calc_length was passing arg which should be unsigned to BLI_stringdec()
2012-04-08 07:34:09 +00:00
19400d418d fix for debug assignment left in from own commit r44778
also removed private face normal update functions - they were same as public.
2012-03-11 15:27:08 +00:00
b1b07fb951 Speedup for ngon normal calculation
- BM_mesh_normals_update was looping over all faces to find the largest one, this is no longer needed.
- calculating a face normal was looping over every faces corners twice, now only once - using the loops directly (not an iterator).
- face vert locations were being copied an array, now use directly.
- calculating the normals would copy a float vector for the next point in the face, which was never used (only current and previous used).
- was copying vectors to compute the normal, now just assign the float pointers.
2012-03-10 03:25:16 +00:00
7cc206ddca Code Cleanup: remove non existing function declarations.
added some missing functions too - which are not used yep but should be there for api completeness.
* CDDM_set_mloop
* CDDM_set_mpoly
* BLI_mempool_count
2012-02-29 15:00:37 +00:00
d1d11bbe9b more header re-arranging.
Some function comments were in headers, some in the C files, some in both.
Moved function comments from headers into the C files.
2012-02-28 18:28:30 +00:00
c48a5fd821 code cleanup,
- bmesh_newcore.c -> bmesh_core.c.
- add bmesh_interp header.
2012-02-28 16:29:48 +00:00
7536bcbe70 Code Cleanup: bmesh
* remove unneeded struct's from headers.
* give argument names for return ** pointers r_ prefix.
2012-02-28 07:42:48 +00:00
4c3e3e93a9 bmesh minor api edits to be a little more typesafe. 2012-02-27 14:57:09 +00:00
130668b12f minor bmesh api naming edits. 2012-02-27 14:07:19 +00:00
98aececc8e bmesh code cleanup
* change BMO_elem_flag_* defines to inline functions.
* BMO_slot_map_insert() is too big for an inline function - un-inline it.
* remove redundant casts.
2012-02-25 20:58:03 +00:00
afc56a0b10 copying bmesh dir on its own from bmesh branch 2012-02-19 18:31:04 +00:00