summaryrefslogtreecommitdiffstats
path: root/core/math/plane.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix copyright headers referring to GodotSpartan3222024-10-271-2/+2
|
* Rebrand preambles to RedotDubhghlas McLaughlin2024-10-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | 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>
* Allow setting negative WorldBoundaryShape2D.distance through the editorkleonc2023-06-141-4/+0
|
* 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".
* Add `is_finite` method for checking built-in typesHaoyu Qiu2022-10-081-0/+4
|
* Enhancements to includes in core data structuresAaron Franke2022-10-051-0/+2
|
* Float literals - fix main primitives to use real_t castinglawnjelly2022-02-241-2/+2
| | | | Uses (real_t) casting to ensure appropriate calculations are done in 32 bit where real_t is compiled as 32 bit.
* Float literals - fix main primitives to use .flawnjelly2022-02-101-2/+2
| | | | Converts float literals from double format (e.g. 0.0) to float format (e.g. 0.0f) where appropriate for 32 bit calculations.
* Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | Happy new year to the wonderful Godot community!
* clang-format: Disable alignment of operands, too unreliableRémi Verschelde2021-10-281-1/+1
| | | | | | | | | Sets `AlignOperands` to `DontAlign`. `clang-format` developers seem to mostly care about space-based indentation and every other version of clang-format breaks the bad mismatch of tabs and spaces that it seems to use for operand alignment. So it's better without, so that it respects our two-tabs `ContinuationIndentWidth`.
* Reformat structure string operatorsAaron Franke2021-06-111-1/+1
| | | | | | The order of numbers is not changed except for Transform2D. All logic is done inside of their structures (and not in Variant). For the number of decimals printed, they now use String::num_real which works best with real_t, except for Color which is fixed at 4 decimals (this is a reliable number of float digits when converting from 16-bpc so it seems like a good choice)
* 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
* Refactored binding system for core typesreduz2020-10-141-0/+26
| | | | | | | | | Moved to a system using variadic templates, shared with CallableBind. New code is cleaner, faster and allows for much better optimization of core type functions from GDScript and GDNative. Added Variant::InternalMethod function for direct call access.
* Update core documentation to match recent C# changesAaron Franke2020-07-211-4/+0
| | | | | | Also a few minor API changes like adding AABB.abs() Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-3/+5
| | | | | 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-13/+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.
* New lightmapperJuan Linietsky2020-05-101-0/+4
| | | | | | | -Added LocalVector (needed it) -Added stb_rect_pack (It's pretty cool, we could probably use it for other stuff too) -Fixes and changes all around the place -Added library for 128 bits fixed point (required for Delaunay3D)
* Revert "Renamed plane's d to distance"Rémi Verschelde2020-05-101-9/+9
| | | | | | | This reverts commit ec7b481170dcd6a7b4cf0e6c1221e204ff7945f3. This was wrong, `d` is not a distance but the `d` constant in the parametric equation `ax + by + cz = d` describing the plane.
* Renamed plane's d to distanceMarcus Elg2020-05-101-9/+9
|
* 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.
* Merge pull request #32477 from aaronfranke/equal-approx-separateRémi Verschelde2019-11-071-5/+2
|\ | | | | Make is_equal_approx separate and make == exact again
| * Replace vector == and is_zero_approx(distance) with is_equal_approxAaron Franke2019-10-141-8/+0
| | | | | | | | Internal changes only
| * Make is_equal_approx separate for structuresAaron Franke2019-10-141-0/+5
| | | | | | | | This commit adds exposed behavior for C#
* | [Mono] Change Plane intersect methods to return nullable Vector3Aaron Franke2019-10-081-1/+1
|/
* [Core] Approximate equalityAaron Franke2019-04-251-2/+2
|
* Revert "fixed invalid implementation of Plane::intersects_segment and ↵Rémi Verschelde2019-01-131-3/+5
| | | | Plane::intersects_ray"
* fixed invalid implementations of Plane::intersects_segment and ↵Evgeny Savelyev2019-01-121-5/+3
| | | | Plane::intersects_ray
* 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/+1
| | | | | | 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.
* 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!
* Use HTTPS URL for Godot's website in the headersRémi Verschelde2017-08-271-1/+1
|
* Use const reference where favorableWilson E. Alvarez2017-08-141-2/+2
|
* Add "Godot Engine contributors" copyright lineRémi Verschelde2017-04-081-0/+1
|
* Fix typos in source code using codespellRémi Verschelde2017-03-241-1/+1
| | | | From https://github.com/lucasdemarchi/codespell
* A Whole New World (clang-format edition)Rémi Verschelde2017-03-051-41/+40
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Revert "Make nan==nan true for GDScript"Juan Linietsky2017-02-141-5/+0
|
* Make nan==nan true for GDScriptHein-Pieter van Braam2017-02-141-0/+5
| | | | | | | | | | | | | After discussing this with Reduz this seemed like the best way to fix #7354. This will make composite values that contain NaN in the same places as well as the same other values compare as the same. Additionally non-composite values now also compare equal if they are both NaN. This breaks IEEE specifications but this is probably what most users expect. There is a GDScript function check for NaN if the user needs this information. This fixes #7354 and probably also fixes #6947
* 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!
* remove trailing whitespaceHubert Jarosz2016-03-091-3/+3
|
* Update copyright to 2016 in headersGeorge Marques2016-01-011-1/+1
|
* Updated copyright year in all headersJuan Linietsky2015-04-181-1/+1
|
* GODOT IS OPEN SOURCEJuan Linietsky2014-02-091-0/+166