summaryrefslogtreecommitdiff
path: root/modules/csg
AgeCommit message (Collapse)Author
2020-11-07Reorganized core/ directory, it was too fatty alreadyreduz
-Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
2020-10-25Optimize SVG using `svgcleaner --multipass`Hugo Locurcio
This decreases the editor binary size by about 8 KB.
2020-08-31Merge pull request #40993 from Calinou/doc-collision-layer-maskRémi Verschelde
Reference the online documentation in collision layer/mask properties
2020-08-13Don't attempt to insert points into degenerate triangles.Marcel Admiraal
Use a simpler degenerate triangle check that calculates area.
2020-08-12Mark the first shape as inside, not the second shape, when CSG shapes areMarcel Admiraal
co-planer.
2020-08-11Merge pull request #40935 from hoontee/master-3Rémi Verschelde
Transform CSGShape collision when necessary
2020-08-11Merge pull request #40919 from hoontee/master-2Rémi Verschelde
Properly handle empty CSGCombiners
2020-08-03Reference the online documentation in collision layer/mask propertiesHugo Locurcio
See https://github.com/godotengine/godot-docs/pull/3863.
2020-08-01Transform CSGShape collision when necessaryhoontee
2020-07-31Properly handle empty CSGCombinershoontee
2020-07-30Ensure CSG parent's _make_dirty() is called when entering a tree.Marcel Admiraal
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