Commit graph

128 commits

Author SHA1 Message Date
Marcel Admiraal
2449b581dd Fix multiple issues with CSGPolygon 2021-08-12 09:55:18 +01:00
Rémi Verschelde
f5836b40d4
doc: Use self-closing tags for return and argument
For the time being we don't support writing a description for those, preferring
having all details in the method's description.

Using self-closing tags saves half the lines, and prevents contributors from
thinking that they should write the argument or return documentation there.

(cherry picked from commit 7adf4cc9b5)
2021-08-03 10:20:19 +02:00
Haoyu Qiu
f4208ad1e8
Do nothing when dragging CSGBox handle perpendicular to the camera
(cherry picked from commit 0f1e107ede)
2021-08-03 09:33:24 +02:00
lawnjelly
e06cd3042f Portals - Fix CSG updates on room conversion
Due to a quirk in CSG Shapes, updating is usually deferred to the next frame. This is problematic as we need to read back the geometry on the first frame when converting levels.

This PR adds a function to CSGShape to force immediate updating (if dirty), and calls it during room conversion.
2021-07-29 12:41:23 +01:00
Aaron Franke
48308a5e0a
Fix CSGSphere3D mesh creation
(cherry picked from commit b2156b22ea)
2021-07-28 15:34:00 +02:00
Rafał Mikrut
cb5faca39a
Prevent setting too big or too small Collision Mask and Layer 2021-06-27 17:40:07 +02:00
Marcel Admiraal
a2204f3cb3 Fix UV mapping on CSGSphere 2021-05-29 19:13:57 +01:00
Rémi Verschelde
140350d767
Style: Enforce braces around if blocks and loops
Using clang-tidy's `readability-braces-around-statements`.
https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2021-05-05 15:02:01 +02:00
Rémi Verschelde
a828398655
Style: Replaces uses of 0/NULL by nullptr (C++11)
Using clang-tidy's `modernize-use-nullptr`.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html
2021-05-04 16:30:23 +02:00
Rémi Verschelde
b5e1e05ef2
Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2021-05-04 14:45:16 +02:00
Rémi Verschelde
64a63e0861
Style: clang-format: Disable AllowShortCaseLabelsOnASingleLine 2021-05-04 14:45:15 +02:00
Rémi Verschelde
3d15f04668
Style: clang-format: Disable AllowShortIfStatementsOnASingleLine 2021-05-04 14:45:15 +02:00
Rémi Verschelde
6e600cb3f0
Style: Set clang-format Standard to c++14 2021-05-04 14:45:15 +02:00
Johannes Witt
41a016c1e8
Fix CSG Path Polygon cache being removed after connect
fixes #30229

(cherry picked from commit bab36f1273)
2021-04-29 12:29:28 +02:00
Marcel Admiraal
a68c88adfd Update CSGMesh3D's documentation to explain how vertex normals are used 2021-04-27 18:37:19 +01:00
Rémi Verschelde
c3272997cd
doc: Update classref headers with 3.4 version 2021-04-26 13:15:29 +02:00
Marcel Admiraal
cfccf77edb
Fix CSGMesh undo not refreshing gizmo
(cherry picked from commit 4311c2f66e)
2021-04-26 12:52:15 +02:00
Marcel Admiraal
decdf4fcbc Fix empty CSGShape error 2021-04-25 08:01:14 +01:00
Rémi Verschelde
015973df04
doc: Make all tutorial links point to 3.3 branch of docs 2021-03-26 10:43:43 +01:00
Rémi Verschelde
1aba997d75
doc: Sync classref with 3.3 version bump 2021-03-23 13:40:34 +01:00
Rémi Verschelde
49646383f1
Update copyright statements to 2021
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 🎆

(cherry picked from commit b5334d14f7)
2021-01-13 16:17:06 +01:00
hoontee
85cc31332a
Properly handle empty CSGShapes
(cherry picked from commit 24a6aac472)
2020-12-29 16:02:02 +01:00
Rémi Verschelde
4287af5148
doc: Make docs.godotengine.org links point to 3.2 branch 2020-10-19 16:10:01 +02:00
Rémi Verschelde
0a26217579
Merge pull request #41200 from madmiraal/fix-38001-3.2
[3.2] Mark the first shape as inside, not the second shape, when CSG shapes are co-planer.
2020-10-01 13:50:19 +02:00
Marcel Admiraal
808865af97
Don't attempt to insert points into degenerate triangles.
Use a simpler degenerate triangle check that calculates area.

(cherry picked from commit 3521239d96)
2020-09-24 14:43:05 +02:00
hoontee
aa0221f0fb
Transform CSGShape collision when necessary
(cherry picked from commit fc8574fbac)
2020-09-24 14:43:05 +02:00
hoontee
8ce88d38f2
Properly handle empty CSGCombiners
(cherry picked from commit 001b6075cb)
2020-09-24 14:43:05 +02:00
Rémi Verschelde
c8859f0463
Fix typos with codespell
Using codespell 1.17.1.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
dof
doubleclick
fave
findn
leapyear
lod
merchantibility
nd
numer
ois
ony
que
seeked
synching
te
uint
unselect
webp
EOF

$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
2020-09-18 14:09:51 +02:00
Hugo Locurcio
cc3b69cf7b
Reference the online documentation in collision layer/mask properties
See https://github.com/godotengine/godot-docs/pull/3863.

(cherry picked from commit c73c327bab)
2020-08-31 15:55:11 +02:00
Marcel Admiraal
557dce8e72 Mark the first shape as inside, not the second shape, when CSG shapes are
co-planer.
2020-08-12 07:28:33 +01:00
Marcel Admiraal
c8d8134288 Ensure CSG parent's _make_dirty() is called when entering a tree.
(cherry picked from commit 9be7b30f35)
2020-07-30 22:45:17 +02:00
Marcel Admiraal
22ff17793c Use is_equal_approx() instead of vertex_snap when checking if ray is
colliding with equiplanar CSG faces.
2020-06-29 19:48:47 +01:00
Marcel Admiraal
8e120230a1 Create degenerate triangles when inserting an edge into a CSG face.
They will be deleted when the faces are merged, but their edges are
needed for merging faces.
2020-06-29 16:40:53 +01:00
Marcel Admiraal
fa0ee28826 Check if point's index exists before adding it to the list of points
that need to split faces when avoiding creating degenerate faces
while merging CSG faces.
2020-06-21 14:41:05 +01:00
Rémi Verschelde
7bf9787921 SCons: Format buildsystem files with psf/black
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.

(cherry picked from commit cd4e46ee65)
2020-06-10 15:30:52 +02:00
Marcel Admiraal
b4302d0d04 Fix 'physicsw' may be used uninitialized warning in csg_shape.cpp 2020-05-11 13:33:20 +01:00
Marcel Admiraal
966139ca4c Fix CSG vertex normal calculation.
(cherry picked from commit 9bd305bfe2)
2020-05-01 10:56:58 +02:00
Marcel Admiraal
11b7f050df Fix multiple issues with CSG module.
- 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-04-19 14:32:45 +01:00
Rajat Goswami
19e71f94d8 Adding missing include guards to header files identified by LGTM.
This addresses the issue godotengine/godot#37143

(cherry picked from commit 2ecf928ae3)
2020-03-25 11:38:54 +01:00
Rémi Verschelde
2d20fc39aa doc: Drop unused 'category' property from header
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-26 16:02:39 +01:00
clayjohn
6b66957b85 Finish documenting CSG* and *probes 2020-01-23 13:54:17 +01:00
Rémi Verschelde
a7f49ac9a1 Update copyright statements to 2020
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.
2020-01-01 11:16:22 +01:00
Aaron Franke
aeb7075628
Replace vector == and is_zero_approx(distance) with is_equal_approx
Internal changes only
2019-10-14 16:47:42 -04:00
Rémi Verschelde
dec10dd776
Merge pull request #32051 from qarmin/some_error_explanation
Added some obvious errors explanations
2019-09-25 11:51:54 +02:00
qarmin
17732fe698 Added some obvious errors explanations 2019-09-25 10:28:50 +02:00
Rémi Verschelde
0ea54eeb06
Merge pull request #30497 from Calinou/editor-gizmos-change-notify
Notify changes in properties that can be edited by 3D gizmos
2019-09-23 22:22:49 +02:00
Rémi Verschelde
159470df08
Merge pull request #32275 from godotengine/skin_support
Added skin support and simplified APIs to override bone position + glTF 2.0 import fixes
2019-09-23 15:02:15 +02:00
luz.paz
91ecd7b6a6 Fix misc. source comment typos
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-19 14:36:52 -04:00
Juan Linietsky
d81ddaf33e Added skin support and simplified APIs to override bone position. 2019-09-18 19:46:32 -03:00
Paul Trojahn
7c9c6df7e4 Replace is_zero_approx(A.distance_to(B)) with A==B
Related to #22988 (Fixes the holes in the shape of
the first comment)
2019-08-19 18:16:58 +02:00