summaryrefslogtreecommitdiffstats
path: root/modules/csg/csg_shape.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix CSGPolygon3D in path mode disappearing at runtime.Evan Todd2023-05-151-1/+1
|
* Add debug collision shape to CSG with collisionRicardo Buring2023-05-031-0/+40
|
* Fix CSG edge case causing intersection line to hit on common edge of 2 ↵K. S. Ernest (iFire) Lee2023-04-271-1/+1
| | | | | | | | | | | | | | | | | | | | triangles. The previous implementation assumed that the intersection entered or exited a shape when it hit right on the common edge of 2 triangles. However, there is also a case where it just "skirts" the other shape on the outside. To fix this, we added code to check the intersection distance and if the normals of the faces are pointed in the same direction as the intersection or not (e.g. inner product > 0). This handles the case where the intersection line hits the common edge of 2 triangles and skirts the other shape on the outside. Extended code to cover a third case. Fixes #58637. Co-authored-by: OldBelge <StevenGeens@users.noreply.github.com>
* Add compatibility code for CSGBox3D width/height/depth from Godot 3.xDESKTOP-9O27V4U\Navi2023-02-131-0/+24
| | | | Fixes #66420.
* Don't generate CSGPolygon3D shape before the assigned path is inside treeMinusKube2023-01-311-2/+2
|
* 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".
* Fix MSVC warnings, rename shadowed variables, fix uninitialized values, ↵bruvzg2022-10-071-55/+55
| | | | change warnings=all to use /W4.
* Rename Curve/Curve2D/Curve3D/Gradient `interpolate()` to `sample()`Hugo Locurcio2022-08-301-8/+8
| | | | | "sampling" is a more accurate term than "interpolating" for what's happening when using that function.
* Rename `str2var` to `str_to_var` and similarMicky2022-08-261-2/+2
| | | | | | | | | | | | | | | | | | Affects the Math class, a good chunk of the audio code, and a lot of other miscellaneous classes, too. - `var2str` -> `var_to_str` - `str2var` -> `str_to_var` - `bytes2var` -> `bytes_to_var` - `bytes2var_with_objects` -> `bytes_to_var_with_objects` - `var2bytes` -> `var_to_bytes` - `var2bytes_with_objects` -> `var_to_bytes_with_objects` - `linear2db` -> `linear_to_db` - `db2linear` -> `db_to_linear` - `deg2rad` -> `deg_to_rad` - `rad2deg` -> `rad_to_deg` - `dict2inst` -> `dict_to_inst` - `inst2dict` -> `inst_to_dict`
* Merge pull request #64339 from YuriSizov/core-multilevel-validate-propertyRémi Verschelde2022-08-221-15/+12
|\
| * Make `_validate_property` a multilevel methodYuri Sizov2022-08-221-15/+12
| |
* | Merge pull request #64343 from TokageItLab/priority-phRémi Verschelde2022-08-221-0/+17
|\ \ | |/ |/|
| * Add collision weight to PhysicsBody for penetrations must be avoidedSilc Renew2022-08-181-0/+17
| | | | | | | | Co-authored-by: Juan Linietsky <reduzio@gmail.com>
* | Remove unintentional PROPERTY_USAGE_INTERNALRedMser2022-08-181-1/+1
|/ | | | | The flag only matters for property definition, but was also used in _validate_property a lot.
* rename translate(d) to translate(d)_local in Transform 2D/3DFabian Keller2022-07-161-3/+3
|
* Add suffixes to all nodes and resourcesFireForge2022-06-111-3/+3
|
* Use suffixes for units in nodes and resourcesAaron Franke2022-05-191-6/+6
|
* Rename `CSGPrimitive3D.invert_faces` to `flip_faces`hoontee2022-05-061-18/+18
|
* Decrease default sizes of some primitive and CSG meshes for consistencyHugo Locurcio2022-04-271-1/+1
|
* Prevent non-smoothed face normals to participate to smoothed face normalsMythTitans2022-03-111-9/+11
|
* Fix normals computation at the 'seam' of smoothed torus shapeMythTitans2022-03-111-0/+6
|
* Discern between virtual and abstract class bindingsreduz2022-03-101-4/+0
| | | | | | | | | | | | | | * Previous "virtual" classes (which can't be instantiated) are not corretly named "abstract". * Added a new "virtual" category for classes, they can't be instantiated from the editor, but can be inherited from script and extensions. * Converted a large amount of classes from "abstract" to "virtual" where it makes sense. Most classes that make sense have been converted. Missing: * Physics servers * VideoStream * Script* classes. which will go in a separate PR due to the complexity involved.
* Revert #52647hoontee2022-03-091-1/+1
|
* Add SNAME macro optimization missed during rebasehoontee2022-03-091-1/+1
|
* Properly handle CSGShape parent and visibility updates, plus some refactoringhoontee2022-03-081-58/+74
|
* Fix normals computation at the 'seam' of smoothed sphere and cylinder shapesMythTitans2022-02-161-0/+7
|
* Convert _notification methods to switch - Chunk CJakob Bouchard2022-02-161-47/+49
|
* Improve the default size for 3D shapes (Box, Capsule, and Cylinder)Aaron Franke2022-02-011-4/+4
|
* Improve CSGPolygon3D documentationHugo Locurcio2022-01-211-1/+1
| | | | - Describe why polygon triangulation usually fails in the error message.
* Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | Happy new year to the wonderful Godot community!
* Fix various typosluz paz2022-01-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Found via ` codespell -q 3 -S ./thirdparty,*.po,./DONORS.md -L ackward,ang,ans,ba,beng,cas,childs,childrens,dof,doubleclick,expct,fave,findn,gird,hist,inout,leapyear,lod,nd,numer,ois,ony,paket,seeked,sinc,switchs,te,uint,varn` Update editor/import/resource_importer_layered_texture.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Update doc/classes/TileSetScenesCollectionSource.xml Co-authored-by: Raul Santos <raulsntos@gmail.com> Update scene/gui/graph_edit.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Update scene/resources/animation.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Update scene/resources/animation.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Update scene/resources/animation.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Update scene/gui/rich_text_label.cpp Co-authored-by: Raul Santos <raulsntos@gmail.com> Revert previously committed change
* 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
|