summaryrefslogtreecommitdiffstats
path: root/core/math/quick_hull.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix copyright headers referring to GodotSpartan3222024-10-271-2/+2
|
* Rebrand preambles to RedotSpartan3222024-10-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | (cherry picked from commit e8542b06acca3c1bdeee4b528411771f0819f084) Credits: Co-authored-by: Skogi <skogi.b@gmail.com> Co-authored-by: Spartan322 <Megacake1234@gmail.com> Co-authored-by: swashberry <swashdev@pm.me> Co-authored-by: Christoffer Sundbom <christoffer_karlsson@live.se> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: McDubh <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: radenthefolf <radenthefolf@gmail.com> Co-authored-by: John Knight <80524176+Tekisasu-JohnK@users.noreply.github.com> Co-authored-by: Adam Vondersaar <adam.vondersaar@uphold.com> Co-authored-by: decryptedchaos <nixgod@gmail.com> Co-authored-by: zaftnotameni <122100803+zaftnotameni@users.noreply.github.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: wesam <108880473+wesamdev@users.noreply.github.com> Co-authored-by: Mister Puma <MisterPuma80@gmail.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: SingleError <isaaconeoneone@gmail.com> Co-authored-by: Bioblaze Payne <BioblazePayne@gmail.com>
* [Core] Add scalar versions of `Vector*` `min/max/clamp/snap(ped)`A Thousand Ships2024-05-021-1/+1
| | | | Convenience for a number of cases operating on single values
* More codespell fixes, do more changes from previous ignore listRémi Verschelde2023-02-011-5/+5
|
* One Copyright Update to rule them allRémi Verschelde2023-01-051-29/+29
| | | | | | | | | | | | | | | | | | | | As many open source projects have started doing it, we're removing the current year from the copyright notice, so that we don't need to bump it every year. It seems like only the first year of publication is technically relevant for copyright notices, and even that seems to be something that many companies stopped listing altogether (in a version controlled codebase, the commits are a much better source of date of publication than a hardcoded copyright statement). We also now list Godot Engine contributors first as we're collectively the current maintainers of the project, and we clarify that the "exclusive" copyright of the co-founders covers the timespan before opensourcing (their further contributions are included as part of Godot Engine contributors). Also fixed "cf." Frenchism - it's meant as "refer to / see".
* Optimize Convex CollisionJuan Linietsky2022-10-131-6/+13
| | | | | | | | Implements the Gauss Mapping optimization to SAT convex collision test. * Described [here](https://ubm-twvideo01.s3.amazonaws.com/o1/vault/gdc2013/slides/822403Gregorius_Dirk_TheSeparatingAxisTest.pdf) by Dirk Gregorius. * Requires adding of face information to edges in MeshData * Took the chance to convert MeshData to LocalVector for performance.
* Add a new HashSet templatereduz2022-05-201-1/+1
| | | | | * Intended to replace RBSet in most cases. * Optimized for iteration speed
* Replace most uses of Map by HashMapreduz2022-05-161-18/+18
| | | | | | | | | | | | * Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
* Fix warnings found by Emscripten 3.1.10Rémi Verschelde2022-05-101-2/+0
| | | | | Fix `-Wunused-but-set-variable`, `-Wunqualified-std-cast-call`, and `-Wliteral-range` warnings.
* Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | Happy new year to the wonderful Godot community!
* Use range iterators for `Map`Lightning_A2021-09-301-12/+12
|
* Use const references where possible for List range iteratorsRémi Verschelde2021-07-251-2/+2
|
* Use C++ iterators for Lists in many situationsAaron Franke2021-07-231-17/+17
|
* Style: Cleanup uses of double spaces between wordsRémi Verschelde2021-06-071-1/+1
| | | | | Or after punctuation. Tried to leave third-party stuff alone, unless it has been heavily modified for Godot.
* Fixes small typos and grammar correctionAnshul7sp12021-03-121-1/+1
|
* Update copyright statements to 2021Rémi Verschelde2021-01-011-2/+2
| | | | | | | | | | | | | | Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
* Reorganized core/ directory, it was too fatty alreadyreduz2020-11-071-1/+1
| | | | | | -Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
* Split `Geometry` singleton into `Geometry2D` and `Geometry3D`Andrii Doroshenko (Xrayez)2020-05-271-9/+9
| | | | Extra `_2d` suffixes are removed from 2D methods accoringly.
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-13/+25
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-31/+0
| | | | | | | | | | | | | | Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
* Replace NULL with nullptrlupoDharkael2020-04-021-3/+3
|
* Update copyright statements to 2020Rémi Verschelde2020-01-011-2/+2
| | | | | | | | | | | Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
* Replace vector == and is_zero_approx(distance) with is_equal_approxAaron Franke2019-10-141-1/+1
| | | | Internal changes only
* Scale quickhull tolerance with mesh sizeHein-Pieter van Braam2019-03-011-2/+2
| | | | | Taken from three.js's implementation. Tested with a wide variety of meshes.
* Add -Wshadow=local to warnings and fix reported issues.marxin2019-02-201-5/+5
| | | | Fixes #25316.
* Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Make core/ includes absolute, remove subfolders from include pathRémi Verschelde2018-09-121-1/+2
| | | | | | This allows more consistency in the manner we include core headers, where previously there would be a mix of absolute, relative and include path-dependent includes.
* Make some debug prints verbose-only, remove othersRémi Verschelde2018-08-241-9/+0
|
* Remove faces in in QuickHull::build() that we don't need anymoreHein-Pieter van Braam2018-08-201-2/+9
| | | | | | | | We delete the faces for consideration in this loop but we can still sometimes find an edge that connects to this face. We now interate over all edges and disconnect edges connecting to this face. This fixes #16560 and fixes #17569
* Reduce unnecessary COW on Vector by make writing explicitHein-Pieter van Braam2018-07-261-4/+4
| | | | | | | | | | | | | | | | | | | | | | | This commit makes operator[] on Vector const and adds a write proxy to it. From now on writes to Vectors need to happen through the .write proxy. So for instance: Vector<int> vec; vec.push_back(10); std::cout << vec[0] << std::endl; vec.write[0] = 20; Failing to use the .write proxy will cause a compilation error. In addition COWable datatypes can now embed a CowData pointer to their data. This means that String, CharString, and VMap no longer use or derive from Vector. _ALWAYS_INLINE_ and _FORCE_INLINE_ are now equivalent for debug and non-debug builds. This is a lot faster for Vector in the editor and while running tests. The reason why this difference used to exist is because force-inlined methods used to give a bad debugging experience. After extensive testing with modern compilers this is no longer the case.
* Fix Coverity reports of uninitialized scalar variableRémi Verschelde2018-04-191-1/+1
| | | | | | | | | | | Fixes most current reports on Coverity Scan of uninitialized scalar variable (CWE-457): https://cwe.mitre.org/data/definitions/457.html These happen most of the time (in our code) when instanciating structs without a constructor (or with an incomplete one), and later returning the instance. This is sometimes intended though, as some parameters are only used in some situations and should not be double-initialized for performance reasons (e.g. `constant` in ShaderLanguage::Token).
* Add missing copyright headers and fix formattingRémi Verschelde2018-01-051-0/+1
| | | | | | Using `misc/scripts/fix_headers.py` on all Godot files. Some missing header guards were added, and the header inclusion order was fixed in the Bullet module.
* Update copyright statements to 2018Rémi Verschelde2018-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Rename Rect3 to AABB.Ferenc Arn2017-11-171-1/+1
| | | | Fixes #12973.
* Fix use of unitialized variablesHein-Pieter van Braam2017-09-021-3/+3
| | | | The second in my quest to make Godot 3.x compile with -Werror on GCC7
* Fix signed and unsigned comparisonsHein-Pieter van Braam2017-09-011-2/+2
| | | | The first in my quest to make Godot 3.x compile with -Werror on GCC7
* Use HTTPS URL for Godot's website in the headersRémi Verschelde2017-08-271-1/+1
|
* Fixed syntax inconsistency in Vector3.snap and Vector3.snappedTwistedTwigleg2017-07-031-1/+1
|
* renamed all Rect3.pos to Rect3.positionalexholly2017-06-091-1/+1
|
* Add "Godot Engine contributors" copyright lineRémi Verschelde2017-04-081-0/+1
|
* A Whole New World (clang-format edition)Rémi Verschelde2017-03-051-169/+130
| | | | | | | | | | | | | | | | | | | | | | | | I can show you the code Pretty, with proper whitespace Tell me, coder, now when did You last write readable code? I can open your eyes Make you see your bad indent Force you to respect the style The core devs agreed upon A whole new world A new fantastic code format A de facto standard With some sugar Enforced with clang-format A whole new world A dazzling style we all dreamed of And when we read it through It's crystal clear That now we're in a whole new world of code
* Overloaded basic math funcs (double and float variants). Use real_t rather ↵Ferenc Arn2017-01-161-3/+3
| | | | | | than float or double in generic functions (core/math) whenever possible. Also inlined some more math functions.
* Style: Fix whole-line commented codeRémi Verschelde2017-01-141-1/+1
| | | | | They do not play well with clang-format which aligns the `//` part with the rest of the code block, thus producing badly indented commented code.
* Type renames:Juan Linietsky2017-01-111-1/+1
| | | | | | | | | | | | Matrix32 -> Transform2D Matrix3 -> Basis AABB -> Rect3 RawArray -> PoolByteArray IntArray -> PoolIntArray FloatArray -> PoolFloatArray Vector2Array -> PoolVector2Array Vector3Array -> PoolVector3Array ColorArray -> PoolColorArray
* Welcome in 2017, dear changelog reader!Rémi Verschelde2017-01-011-1/+1
| | | | | | | | That year should bring the long-awaited OpenGL ES 3.0 compatible renderer with state-of-the-art rendering techniques tuned to work as low as middle end handheld devices - without compromising with the possibilities given for higher end desktop games of course. Great times ahead for the Godot community and the gamers that will play our games!
* Update copyright to 2016 in headersGeorge Marques2016-01-011-1/+1
|
* Updated copyright year in all headersJuan Linietsky2015-04-181-1/+1
|
* -Much improvement to baked light bakerJuan Linietsky2014-10-271-1/+1
| | | | | | | -Fixed many bugs in stretch mode -Fixes to camera project and unproject as consequence of the above -added setget to script (documented in script doc) -more fixes to collada exporter for blender
* Little BitsJuan Linietsky2014-10-121-0/+1
| | | | | | | | | | | | | | | | | | | -=-=-=-=-=- -fix duplicate function bug when creating script callback in editor -fix bug where hiding lights does not work -fix 2D audio listener bug (romulox_x reported) -fix exported properties with inheritance bug -fix timer autostart (make it not work on editor) -reactivate first camara found if viewport runs out of active camera -option to hide gizmos in viewport -changed skeleton gizmo because it sucks -Make convex shapes using CollisionShape visible (use quickhull class) -fix up menu when editing a mesh, to export collision, navmesh, convex, etc. from it. -make a menu option to show SRGB in 3D editor views by default -make option to edit default light direction in viewport settings -make option to edit default ambient light in viewport settings -make software conversion of linear->RGB if hardware support not found
* GODOT IS OPEN SOURCEJuan Linietsky2014-02-091-0/+513