summaryrefslogtreecommitdiffstats
path: root/modules/csg/csg_shape.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Rename `PROPERTY_USAGE_NOEDITOR` to `PROPERTY_USAGE_NO_EDITOR`Hugo Locurcio2021-11-031-2/+2
| | | | | This is consistent with other constants that include `NO`, such as `PROPERTY_HINT_COLOR_NO_ALPHA`.
* Refactored Node3D rotation modesreduz2021-10-251-0/+1
| | | | | | | | | * Made the Basis euler orders indexed via enum. * Node3D has a new rotation_order property to choose Euler rotation order. * Node3D has also a rotation_mode property to choose between Euler, Quaternion and Basis Exposing these modes as well as the order makes Godot a lot friendlier for animators, which can choose the best way to interpolate rotations. The new *Basis* mode makes the (exposed) transform property obsolete, so it was removed (can still be accessed by code of course).
* Fixed a typo in csg moduleM. Huri2021-10-121-1/+1
|
* CSGPolygon fixes and features: Angle simplification, UV tiling distance, ↵jitspoe2021-09-271-182/+268
| | | | interval type.
* Don't update CSG Shape when not inside treeHaoyu Qiu2021-09-141-1/+1
|
* Merge pull request #51532 from nekomatata/layer-mask-accessorsRémi Verschelde2021-08-121-22/+26
|\ | | | | Uniformize layer names, script methods and documentation
| * Uniformize layer names, script methods and documentationPouleyKetchoupp2021-08-121-22/+26
| | | | | | | | | | | | | | - Back to 1-based layer names to make it clearer in editor UI - Layer bit accessors are renamed to layer value and 1-based too - Uniform errors and documentation in render and physics - Fix a few remaining collision_layer used in place of collision_mask
* | Fix multiple issues with CSGPolygonMarcel Admiraal2021-08-121-414/+239
|/
* Fix CSGSphere3D mesh creationAaron Franke2021-07-261-31/+35
|
* Node3D gizmo improvementsjfons2021-07-231-26/+26
| | | | | | | | * Clean-up of node_3d_editor_plugin.{h,cpp}: removed unused code, fixed some bugs. * Moved node_3d_editor_gizmos.{h,cpp} to editor/plugins. * Added support for multiple gizmos per node. This means custom gizmos will no longer override the built-in ones and that multiple gizmos can be used in more complex nodes. * Added support for handle IDs. When adding handles to a gizmo, an ID can be specified for each one, making it easier to work with gizmos that have a variable number of handles. * Added support for subgizmos, selectable elements that can be transformed without needing a node of their own. By overriding _subgizmo_intersect_frustum() and/or _subgizmo_intersect_ray() gizmos can define which subgizmos should be selected on a region or click selection. Subgizmo transformations are applied using get/set/commit virtual methods, similar to how handles work.
* Use is_equal_approx in more placesAaron Franke2021-07-211-2/+2
|
* Optimize StringName usagereduz2021-07-181-1/+1
| | | | | | | | | | | * Added a new macro SNAME() that constructs and caches a local stringname. * Subsequent usages use the cached version. * Since these use a global static variable, a second refcounter of static usages need to be kept for cleanup time. * Replaced all theme usages by this new macro. * Replace all signal emission usages by this new macro. * Replace all call_deferred usages by this new macro. This is part of ongoing work to optimize GUI and the editor.
* Allow using ORMMaterial3D by using BaseMaterial3D as a resource hintHugo Locurcio2021-07-041-6/+6
| | | | | | | | Previously, only StandardMaterial3D could be defined as an alternative to ShaderMaterial. This also reorders the CanvasItemMaterial property hints to follow alphabetical order (which is enforced by the inspector).
* Use PROPERTY_USAGE_NONE instead of 0 for no property usageAaron Franke2021-07-011-3/+3
| | | | Also use const more often.
* Fix editor suffixes and degrees conversionreduz2021-06-301-6/+6
| | | | | | | | | | | | | * Functions to convert to/from degrees are all gone. Conversion is done by the editor. * Use PROPERTY_HINT_ANGLE instead of PROPERTY_HINT_RANGE to edit radian angles in degrees. * Added possibility to add suffixes to range properties, use "min,max[,step][,suffix:<something>]" example "0,100,1,suffix:m" * In general, can add suffixes for EditorSpinSlider Not covered by this PR, will have to be addressed by future ones: * Ability to switch radians/degrees in the inspector for angle properties (if actually wanted). * Animations previously made will most likely break, need to add a way to make old ones compatible. * Only added a "px" suffix to 2D position and a "m" one to 3D position, someone needs to go through the rest of the engine and add all remaining suffixes. * Likely also need to track down usage of EditorSpinSlider outside properties to add suffixes to it too.
* Rename `instance()`->`instantiate()` when it's a verbLightning_A2021-06-191-3/+3
|
* Rename Transform to Transform3D in coreAaron Franke2021-06-031-4/+4
|
* Fix UV mapping on CSGSphereMarcel Admiraal2021-05-291-27/+25
|
* Change Path to Path3D in CSGPolygon3Drafallus2021-05-011-1/+1
|
* Prevent setting too big or too small Collision Mask and LayerRafał Mikrut2021-04-301-4/+8
|
* Fix CSG Path Polygon cache being removed after connectJohannes Witt2021-04-271-1/+0
| | | | fixes #30229
* Fix CSGMesh undo not refreshing gizmoMarcel Admiraal2021-04-251-1/+1
|
* Rename Array.invert() to Array.reverse()Marcel Admiraal2021-03-211-1/+1
| | | | | Does the same internally for List and Vector<>, which includes all PackedArray types.
* Fixes small typos and grammar correctionAnshul7sp12021-03-121-1/+1
|
* Removed _change_notifyreduz2021-02-101-8/+2
| | | | | | -For inspector refresh, the inspector now detects if a property change by polling a few times per second and then does update the control if so. This process is very cheap. -For property list refresh, a new signal (property_list_changed) was added to Object. _change_notify() is replaced by notify_property_list_changed() -Changed all objects using the old method to the signal, or just deleted the calls to _change_notify(<property>) since they are unnecesary now.
* Make Servers truly Thread Safereduz2021-02-101-2/+4
| | | | | | | | | -Rendering server now uses a split RID allocate/initialize internally, this allows generating RIDs immediately but initialization to happen later on the proper thread (as rendering APIs generally requiere to call on the right thread). -RenderingServerWrapMT is no more, multithreading is done in RenderingServerDefault. -Some functions like texture or mesh creation, when renderer supports it, can register and return immediately (so no waiting for server API to flush, and saving staging and command buffer memory). -3D physics server changed to be made multithread friendly. -Added PhysicsServer3DWrapMT to use 3D physics server from multiple threads. -Disablet Bullet (too much effort to make multithread friendly, this needs to be fixed eventually).
* Initialize class/struct variables with default values in modules/Rafał Mikrut2021-02-081-9/+0
|
* Use Math_TAU and deg2rad/rad2deg in more places and optimize codeAaron Franke2021-01-091-12/+14
|
* 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 🎆
* Merge pull request #44183 from madmiraal/box_shape-sizeRémi Verschelde2020-12-281-46/+9
|\ | | | | Use a size Vector for adjusting the size of Rectangles and Boxes
| * Use Vector3 instead of 3 floats for CSGBox3D dimensionsMarcel Admiraal2020-12-081-46/+9
| |
* | Merge pull request #44718 from hoontee/fix-44713Rémi Verschelde2020-12-271-11/+11
|\ \ | |/ |/| Properly handle empty CSGShapes
| * Properly handle empty CSGShapeshoontee2020-12-271-11/+11
| |
* | Merge pull request #40935 from hoontee/master-3Rémi Verschelde2020-08-111-0/+6
|\ \ | | | | | | Transform CSGShape collision when necessary
| * | Transform CSGShape collision when necessaryhoontee2020-08-011-0/+6
| |/
* | Merge pull request #40919 from hoontee/master-2Rémi Verschelde2020-08-111-1/+1
|\ \ | | | | | | Properly handle empty CSGCombiners
| * | Properly handle empty CSGCombinershoontee2020-07-311-1/+1
| |/
* / Ensure CSG parent's _make_dirty() is called when entering a tree.Marcel Admiraal2020-07-301-8/+3
|/
* Split `Geometry` singleton into `Geometry2D` and `Geometry3D`Andrii Doroshenko (Xrayez)2020-05-271-1/+2
| | | | Extra `_2d` suffixes are removed from 2D methods accoringly.
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-35/+66
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: Enforce separation line between function definitionsRémi Verschelde2020-05-141-0/+4
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-84/+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.
* Fix 'physicsw' may be used uninitialized warning in csg_shape.cppMarcel Admiraal2020-05-111-19/+19
|
* Style: clang-format: Disable AllowShortCaseLabelsOnASingleLineRémi Verschelde2020-05-101-5/+15
| | | | Part of #33027.
* Style: clang-format: Disable AllowShortIfStatementsOnASingleLineRémi Verschelde2020-05-101-5/+9
| | | | | | | 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.
* Merge pull request #37717 from qarmin/world_fixRémi Verschelde2020-05-041-2/+2
|\ | | | | Change non-existent World to World3D
| * Change non-existent World to World3Dqarmin2020-04-181-2/+2
| |
* | Merge pull request #37163 from madmiraal/fix-csg-normalRémi Verschelde2020-04-281-11/+9
|\ \ | |/ |/| Fix CSG vertex normal calculation.
| * Fix CSG vertex normal calculation.Marcel Admiraal2020-03-191-11/+9
| |
* | Replace NULL with nullptrlupoDharkael2020-04-021-26/+26
| |