summaryrefslogtreecommitdiff
path: root/modules/csg
AgeCommit message (Collapse)Author
2020-07-10Add override keywords.Marcel Admiraal
2020-06-29Use is_equal_approx() instead of vertex_snap when checking if ray isMarcel Admiraal
colliding with equiplanar CSG faces.
2020-06-29Create degenerate triangles when inserting an edge into a CSG face.Marcel Admiraal
They will be deleted when the faces are merged, but their edges are needed for merging faces.
2020-06-21Check if point's index exists before adding it to the list of pointsMarcel Admiraal
that need to split faces when avoiding creating degenerate faces while merging CSG faces.
2020-05-27Split `Geometry` singleton into `Geometry2D` and `Geometry3D`Andrii Doroshenko (Xrayez)
Extra `_2d` suffixes are removed from 2D methods accoringly.
2020-05-14Style: Enforce braces around if blocks and loopsRémi Verschelde
Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14Style: Enforce separation line between function definitionsRémi Verschelde
I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.
2020-05-14Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde
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.
2020-05-11Fix 'physicsw' may be used uninitialized warning in csg_shape.cppMarcel Admiraal
2020-05-10Style: clang-format: Disable AllowShortCaseLabelsOnASingleLineRémi Verschelde
Part of #33027.
2020-05-10Style: clang-format: Disable AllowShortIfStatementsOnASingleLineRémi Verschelde
Part of #33027, also discussed in #29848. Enforcing the use of brackets even on single line statements would be preferred, but `clang-format` doesn't have this functionality yet.
2020-05-04Merge pull request #37717 from qarmin/world_fixRémi Verschelde
Change non-existent World to World3D
2020-04-29[Core] Rename linear_interpolate to lerpAaron Franke
2020-04-28Merge pull request #37163 from madmiraal/fix-csg-normalRémi Verschelde
Fix CSG vertex normal calculation.
2020-04-18Change non-existent World to World3Dqarmin
2020-04-07Rename all gizmo classes, using the 4.0 node names.jfons
2020-04-02Replace NULL with nullptrlupoDharkael
2020-03-30Merge pull request #37436 from akien-mga/doc-node-renamesRémi Verschelde
doc: Update classref with node renames
2020-03-30Fix another batch of -Wmaybe-uninitialized warningsRémi Verschelde
And simplify code in CSGShape.
2020-03-30doc: Update classref with node renamesRémi Verschelde
A few extra renames for classes which were missed in last week's PRs.
2020-03-30SCons: Format buildsystem files with psf/blackRémi Verschelde
Configured for a max line length of 120 characters. psf/black is very opinionated and purposely doesn't leave much room for configuration. The output is mostly OK so that should be fine for us, but some things worth noting: - Manually wrapped strings will be reflowed, so by using a line length of 120 for the sake of preserving readability for our long command calls, it also means that some manually wrapped strings are back on the same line and should be manually merged again. - Code generators using string concatenation extensively look awful, since black puts each operand on a single line. We need to refactor these generators to use more pythonic string formatting, for which many options are available (`%`, `format` or f-strings). - CI checks and a pre-commit hook will be added to ensure that future buildsystem changes are well-formatted.
2020-03-27Renaming of servers for coherency.Juan Linietsky
VisualServer -> RenderingServer PhysicsServer -> PhysicsServer3D Physics2DServer -> PhysicsServer2D NavigationServer -> NavigationServer3D Navigation2DServer -> NavigationServer2D Also renamed corresponding files.
2020-03-27Rename more 2D and 3D nodes to follow conventionRémi Verschelde
Rename editor plugins to match the new node names.
2020-03-27Renamed 2D and 3D nodes to make their types explicitJuan Linietsky
Fixes #30736.
2020-03-27Fix various -Wmaybe-uninitialized (#37352).Martin Liska
2020-03-23Adding missing include guards to header files identified by LGTM.Rajat Goswami
This addresses the issue godotengine/godot#37143
2020-03-19Fix CSG vertex normal calculation.Marcel Admiraal
2020-03-17Style: Set clang-format Standard to Cpp11Rémi Verschelde
For us, it practically only changes the fact that `A<A<int>>` is now used instead of the C++03 compatible `A<A<int> >`. Note: clang-format 10+ changed the `Standard` arguments to fully specified `c++11`, `c++14`, etc. versions, but we can't use `c++17` now if we want to preserve compatibility with clang-format 8 and 9. `Cpp11` is still supported as deprecated alias for `Latest`.
2020-03-11Fix various typosluz.paz
Found via `codespell`
2020-03-08Fix missing module editor iconsAndrii Doroshenko (Xrayez)
Module icons need to be renamed to PascalCase as well for them to be registered in 4.0. See godotengine/godot#36513.
2020-02-29Merge pull request #36422 from madmiraal/fix-csgRémi Verschelde
Fix multiple issues with CSG module.
2020-02-28Signals: Port connect calls to use callable_mpRémi Verschelde
Remove now unnecessary bindings of signal callbacks in the public API. There might be some false positives that need rebinding if they were meant to be public. No regular expressions were harmed in the making of this commit. (Nah, just kidding.)
2020-02-25Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.Juan Linietsky
- Renames PackedIntArray to PackedInt32Array. - Renames PackedFloatArray to PackedFloat32Array. - Adds PackedInt64Array and PackedFloat64Array. - Renames Variant::REAL to Variant::FLOAT for consistency. Packed arrays are for storing large amount of data and creating stuff like meshes, buffers. textures, etc. Forcing them to be 64 is a huge waste of memory. That said, many users requested the ability to have 64 bits packed arrays for their games, so this is just an optional added type. For Variant, the float datatype is always 64 bits, and exposed as `float`. We still have `real_t` which is the datatype that can change from 32 to 64 bits depending on a compile flag (not entirely working right now, but that's the idea). It affects math related datatypes and code only. Neither Variant nor PackedArray make use of real_t, which is only intended for math precision, so the term is removed from there to keep only float.
2020-02-21Fix multiple issues with CSG module.Marcel Admiraal
- Replaces BuildPoly with Build2DFaces, which creates faces as each pair of face intersections are processed, instead of trying to create them after all the intersections are processed. Ensures that faces are merged when possible, and removes degenerate triangles. - Treats the child as inside the parent when faces are coplanar. - General clean up of csg.h and csg.cpp.
2020-02-20Reworked signal connection system, added support for Callable and Signal ↵Juan Linietsky
objects and made them default.
2020-02-18doc: Sync classref with current sourceRémi Verschelde
Handle removal of Pool*Array types and other recent changes.
2020-02-18PoolVector is gone, replaced by VectorJuan Linietsky
Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are sugar for `Vector<Type>`.
2020-02-11Modernized default 3D material, fixes material bugs.Juan Linietsky
2020-01-31Update docs to version 4.0clayjohn
2020-01-26doc: Drop unused 'category' property from headerRémi Verschelde
We already removed it from the online docs with #35132. Currently it can only be "Built-In Types" (Variant types) or "Core" (everything else), which is of limited use. We might also want to consider dropping it from `ClassDB` altogether in Godot 4.0.
2020-01-23Finish documenting CSG* and *probesclayjohn
2020-01-01Update copyright statements to 2020Rémi Verschelde
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.
2019-10-14Replace vector == and is_zero_approx(distance) with is_equal_approxAaron Franke
Internal changes only
2019-09-25Merge pull request #32051 from qarmin/some_error_explanationRémi Verschelde
Added some obvious errors explanations
2019-09-25Added some obvious errors explanationsqarmin
2019-09-23Merge pull request #30497 from Calinou/editor-gizmos-change-notifyRémi Verschelde
Notify changes in properties that can be edited by 3D gizmos
2019-09-23Merge pull request #32275 from godotengine/skin_supportRémi Verschelde
Added skin support and simplified APIs to override bone position + glTF 2.0 import fixes
2019-09-19Fix misc. source comment typosluz.paz
Found using `codespell -q 3 -S ./thirdparty,*.po -L ang,ba,cas,dof,doubleclick,fave,hist,leapyear,lod,nd,numer,ois,paket,seeked,sinc,switchs,te,uint -D ~/Projects/codespell/codespell_lib/data/dictionary.txt `
2019-09-18Added skin support and simplified APIs to override bone position.Juan Linietsky
2019-08-19Replace is_zero_approx(A.distance_to(B)) with A==BPaul Trojahn
Related to #22988 (Fixes the holes in the shape of the first comment)