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
AgeCommit message (Collapse)Author
2020-05-13Merge branch 'blender-v2.83-release'Antonio Vazquez
2020-05-13Fix T76665: Wrong files selected when using box selectJacques Lucke
Reviewers: Severin Differential Revision: https://developer.blender.org/D7705
2020-05-08Cleanup: take includes out of 'extern "C"' blocksJacques Lucke
Surrounding includes with an 'extern "C"' block is not necessary anymore. Also that made it harder to add any C++ code to some headers, or include headers that have "optional" C++ code like `MEM_guardedalloc.h`. I tested compilation on linux and windows (and got help from @LazyDodo). If this still breaks compilation due to some linker error, the header containing the symbol in question is probably missing an 'extern "C"' block. Differential Revision: https://developer.blender.org/D7653
2020-04-14BLI_math: add min/max utils for chars.Bastien Montagne
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-18Cleanup: Fix build warnings on windows.Ray Molenkamp
Two headers define the _USE_MATH_DEFINES symbol now, if both are included warnings are generated. Added some guards, all good again.
2020-03-09Cleanup: Replace ABS/SQUARE/CUBE with function callsSergey Sharybin
While it might be handy to have type-less functionality which is similar to how C++ math is implemented it can not be easily achieved with just preprocessor in a way which does not have side-effects on wrong usage. There macros where often used on a non-trivial expression, and there was at least one usage where it was causing an actual side effect/bug on Windows (see change around square_f(sh[index++]) in studiolight.c). For such cases it is handy to have a function which is guaranteed to have zero side-effects. The motivation behind actually removing the macros is that there is already a way to do similar calculation. Also, not having such macros is a way to guarantee that its usage is not changed in a way which have side-effects and that it's not used as an inspiration for cases where it should not be used. Differential Revision: https://developer.blender.org/D7051
2019-09-13BLI: new C++ hash table data structuresJacques Lucke
This commit adds some new hashing based data structures to blenlib. All of them use open addressing with probing currently. Furthermore, they support small object optimization, but it is not customizable yet. I'll add support for this when necessary. The following main data structures are included: **Set** A collection of values, where every value must exist at most once. This is similar to a Python `set`. **SetVector** A combination of a Set and a Vector. It supports fast search for elements and maintains insertion order when there are no deletes. All elements are stored in a continuous array. So they can be iterated over using a normal `ArrayRef`. **Map** A set of key-value-pairs, where every key must exist at most once. This is similar to a Python `dict`. **StringMap** A special map for the case when the keys are strings. This case is fairly common and allows for some optimizations. Most importantly, many unnecessary allocations can be avoided by storing strings in a single buffer. Furthermore, the interface of this class uses `StringRef` to avoid unnecessary conversions. This commit is a continuation of rB369d5e8ad2bb7.
2019-08-29Move math and vector double routines into blenlib from delaunay codeHoward Trickey
2019-08-20BLI: double version of some math functions.YimingWu
2019-08-01Cleanup: misc spelling fixesCampbell Barton
T68035 by @luzpaz
2019-04-21Cleanup: comments (long lines) in blenlibCampbell Barton
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
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-02-18doxygen: add newline after \fileCampbell Barton
While \file doesn't need an argument, it can't have another doxy command after it.
2019-02-06Cleanup: remove redundant doxygen \file argumentCampbell Barton
Move \ingroup onto same line to be more compact and make it clear the file is in the group.
2019-02-01Cleanup: remove redundant, invalid info from headersCampbell Barton
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.
2018-06-06Fix BLI_ASSERT_UNIT macro w/ non-finite numbersCampbell Barton
2018-03-15BLI_assert: extract from BLI_utildefinesCampbell Barton
BLI_utildefines is quite large, defining many unrelated things. Add BLI_assert to include in inline headers, so math defines don't pull in too much.
2018-02-14Math utils: Add clamping functionsSergey Sharybin
2018-01-19Fixup for integer digits commitDalai Felinto
2018-01-10math utils: Add size_t version of min and max functionsSergey Sharybin
2017-09-27Math Lib: Add non-clamped round_* functionsCampbell Barton
Replace iroundf with round_fl_to_int, add other types
2017-09-18Math Lib: clamped rounding utility functionsCampbell Barton
2017-08-01BLI_math: add simple helper to get amount of 'integer' digits in a float number.Bastien Montagne
2016-12-03Fix macOS build with openimageio 1.7.8 and openexr.Brecht Van Lommel
These macros conflict and are no longer needed with C99 or C++ anyway.
2016-05-17C99/C++11: replace deprecated finite() by isfinite().Brecht Van Lommel
2015-07-10BLI_math 'compare' cleanup & enhancements.Bastien Montagne
This commit: * Adds a 'compare_ff' function for absolute 'almost equal' comparison of floats. * Makes 'compare_vxvx' functions use that new 'compare_ff' one. * Adds a 'compare_ff_relative' function for secured ulp-based relative comparison of floats. * Adds matching 'compare_vxvx_relative' functions. * Adds some basic tests for compare_ff_relative. See https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/ Note that we could replace our python/mathutils' EXPP_FloatsAreEqual() by BLI's compare_ff_relative (using a very small absolute max_diff), but these do not have exact same behavior... Left a comment there for now, we can do it later if/when we are sure it won't break anything!
2015-06-20Cleanup: checks for unsupported MSVC versionsCampbell Barton
2015-04-24Math Lib: pow_i for int power-ofCampbell Barton
2015-04-21Math Lib: handling bits handling into own fileCampbell Barton
2015-01-31Comment for math defines, also add M_PI_4Campbell Barton
2014-12-27Fix T43034: beautify-fill leaves zero area tri'sCampbell Barton
2014-11-22Math Lib: add constant: M_SQRT1_3 1/sqrt(3)Campbell Barton
2014-11-11Avoid calling powf with integer exponent in more placesSergej Reich
Move powX functions from particle code into math library and use them.
2014-10-10Code cleanup: Fix silly duplication of typecheck and swap macroSergey Sharybin
2014-09-30Use native float math functions for MSVC12Sv. Lockal
`double` surrogates are slow (e.g. pow is 2x slower than powf), and MSVC12 supports fp-math functions from C99.
2014-08-14remove MAXFLOAT defineCampbell Barton
2014-08-07Cleanup: Remove special code for Visual Studio 2008.Thomas Dinges
Goodbye VC2008, it has been a pleasure (more or less) :D SCons / CMake cleaenup will follow. Differential Revision: https://developer.blender.org/D715
2014-08-02Make CHECK_TYPE_NONCONST macro portableCampbell Barton
also replace __typeof -> typeof
2014-05-13Fix compilation error with debug SConsSergey Sharybin
For some reason SCons defines _DEBUG, not DEBUG as mathutils was expecting it to be. Made it so mathutils checks for NDEBUG which mimics BLI_assert define.
2014-04-19Math Lib: add shell_v3v3_normalized_to_dist and v2 versionCampbell Barton
bypass angle calculation to avoids (asin, sqrt, cos).
2014-04-19Math Lib: add rotation_between_vecs_to_mat3Campbell Barton
- behaves like rotation_between_vecs_to_quat - avoids calling sin,cos calls (approx 1.6x faster).
2014-04-11Math Lib: use less strict epsilon with BLI_ASSERT_UNIT_QUATCampbell Barton
was causing issues with pointcache
2014-04-05Math Lib: add power of 2 min/max for unsigned intsCampbell Barton
2014-03-20Math Lib: add angle_qt functionsCampbell Barton
2014-02-15Compile fix for 004decc1d940...Thomas Dinges
2014-02-15Code cleanup: warningsCampbell Barton
2014-01-15Math Lib: add iroundf function for: (int)floorf(a + 0.5f)Campbell Barton
2014-01-03Code Cleanup: WIN32 defines, check for _MSC_VER instead of !FREE_WINDOWSCampbell Barton
2014-01-03Fix :I broke the build for MSVC 2008 this fixes itMartijn Berger