summaryrefslogtreecommitdiffstats
path: root/scene/2d/polygon_2d.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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 🎆
* Refactored 2D shader and lighting systemreduz2020-10-241-57/+1
| | | | | | | | | | -Removed normal/specular properties from nodes -Create CanvasTexture, which can contain normal/specular channels -Refactored, optimized and simplified 2D shaders -Use atlas for light textures. -Use a shadow atlas for shadow textures. -Use both items aboves to make light rendering stateless (faster). -Reorganized uniform sets for more efficiency.
* Split `Geometry` singleton into `Geometry2D` and `Geometry3D`Andrii Doroshenko (Xrayez)2020-05-271-4/+4
| | | | Extra `_2d` suffixes are removed from 2D methods accoringly.
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-9/+16
| | | | | 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/+16
| | | | | | | | | | | | | | | | | | | | | | | 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-44/+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.
* Enforce use of bool literals instead of integersRémi Verschelde2020-05-141-1/+1
| | | | | Using clang-tidy's `modernize-use-bool-literals`. https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-bool-literals.html
* Replace NULL with nullptrlupoDharkael2020-04-021-1/+1
|
* Renaming of servers for coherency.Juan Linietsky2020-03-271-4/+4
| | | | | | | | | | VisualServer -> RenderingServer PhysicsServer -> PhysicsServer3D Physics2DServer -> PhysicsServer2D NavigationServer -> NavigationServer3D Navigation2DServer -> NavigationServer2D Also renamed corresponding files.
* Signals: Port connect calls to use callable_mpRémi Verschelde2020-02-281-4/+2
| | | | | | | | | 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.)
* Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.Juan Linietsky2020-02-251-4/+4
| | | | | | | | | | | | | | | | | | | | | - 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.
* Reworked signal connection system, added support for Callable and Signal ↵Juan Linietsky2020-02-201-2/+2
| | | | objects and made them default.
* PoolVector is gone, replaced by VectorJuan Linietsky2020-02-181-20/+20
| | | | | Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are sugar for `Vector<Type>`.
* ObjectID converted to a structure, fixes many bugs where used incorrectly as ↵Juan Linietsky2020-02-121-2/+2
| | | | 32 bits.
* Normalmapping and Specularmapping working in 2D engineJuan Linietsky2020-02-111-1/+56
| | | | Added support for Sprite, AnimatedSprite and Polygon2D (should add for tileset eventually).
* Bugfixes and ability to better specify filter and repeat modes everywhere.Juan Linietsky2020-02-111-2/+2
| | | | Removes antialiased flag for draw_* methods.
* A lot of progress with canvas rendering, still far from working.Juan Linietsky2020-02-111-5/+2
|
* Texture refactorJuan Linietsky2020-02-111-5/+5
| | | | | | | | -Texture renamed to Texture2D -TextureLayered as base now inherits 2Darray, cubemap and cubemap array -Removed all references to flags in textures (they will go in the shader) -Texture3D gone for now (will come back later done properly) -Create base rasterizer for RenderDevice, RasterizerRD
* Remove unused #if 0'ed codeRémi Verschelde2020-01-211-189/+0
|
* Don't compile editor-only function when tools=noGilles Roudière2020-01-091-0/+2
|
* Update copyright statements to 2020Rémi Verschelde2020-01-011-2/+2
| | | | | | | | | | | 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.
* Fixed antialiased option for Polygon2D / Line2DPouleyKetchoupp2019-11-281-2/+2
| | | | | | | | | | Polygon2D: The property wasn't used anymore after switching from canvas_item_add_polygon() to canvas_item_add_triangle_array() for drawing. Line2D: Added the same property as for Polygon2D & fixed smooth line drawing to use indices correctly. Fixes #26823
* Altered rotation_degrees rangeSoumya Lahiri2019-09-301-1/+1
|
* Fix some issue with TileMap's and other nodes' boundariesBojidar Marinov2019-07-081-1/+1
| | | | | Fixes #30348 Addresses a small part of #30012
* Clean up and fix some situations where triangulation may fail, closes #26366Juan Linietsky2019-03-021-1/+3
|
* Updat polygons when skeleton setup changes, fixes #25949Juan Linietsky2019-02-161-2/+26
|
* Appease some CppCheck warns for files in the "scene" directoryMichael Alexsander Silva Dias2019-01-161-3/+0
|
* Removed splits in Polygon editor, replace by internal vertices and polygon ↵Juan Linietsky2019-01-081-66/+248
| | | | support.
* Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Ensure no crash happens when skeleton is removed, closes #20677Juan Linietsky2018-11-231-1/+1
|
* Make some debug prints verbose-only, remove othersRémi Verschelde2018-08-241-3/+0
|
* Lift 1440 limit in rotation_degrees hint rangeRémi Verschelde2018-08-161-1/+3
| | | | Fixes #15947.
* Reduce unnecessary COW on Vector by make writing explicitHein-Pieter van Braam2018-07-261-12/+12
| | | | | | | | | | | | | | | | | | | | | | | This commit makes operator[] on Vector const and adds a write proxy to it. From now on writes to Vectors need to happen through the .write proxy. So for instance: Vector<int> vec; vec.push_back(10); std::cout << vec[0] << std::endl; vec.write[0] = 20; Failing to use the .write proxy will cause a compilation error. In addition COWable datatypes can now embed a CowData pointer to their data. This means that String, CharString, and VMap no longer use or derive from Vector. _ALWAYS_INLINE_ and _FORCE_INLINE_ are now equivalent for debug and non-debug builds. This is a lot faster for Vector in the editor and while running tests. The reason why this difference used to exist is because force-inlined methods used to give a bad debugging experience. After extensive testing with modern compilers this is no longer the case.
* Changes to how node paths are selected from property, allowing setting a hint.Juan Linietsky2018-06-271-1/+1
|
* Skeleton for 2D WIPJuan Linietsky2018-05-031-3/+83
|
* WIP Polygon2D weight editingJuan Linietsky2018-05-021-0/+84
|
* Remove the selection rect for nodes that do not require itGilles Roudiere2018-04-031-0/+4
|
* Add a split editor to polygon 2D UV editor, moving an inch closer to adding ↵Juan Linietsky2018-02-251-1/+90
| | | | support for in the future
* 2D editor GUI input rework. Changes are:Gilles Roudiere2018-02-161-16/+26
| | | | | | | | | | - The input handling is done into several distinct functions, and the code is more consistent. - The actions' history is more precise ("Edited CanvasItem" is now "Rotated CanvasItem","Moved CanvasItem",etc...) - Fixed a little bug about input key events not forwarded correctly to plugins - IK is followed by default when you move a bone node, the alt-key allow you to move it normally
* Bind many more properties to scriptsBojidar Marinov2018-01-121-1/+2
| | | | | | | Notable potentially breaking changes: - PROPERTY_USAGE_NOEDITOR is now PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_NETWORK, without PROPERTY_USAGE_INTERNAL - Some properties were renamed, and sometimes even shadowed by new ones - New getter methods (some virtual) were added
* Add missing copyright headers and fix formattingRémi Verschelde2018-01-051-0/+1
| | | | | | Using `misc/scripts/fix_headers.py` on all Godot files. Some missing header guards were added, and the header inclusion order was fixed in the Bullet module.
* Merge pull request #15093 from poke1024/canvas-editor-selectRémi Verschelde2018-01-031-1/+6
|\ | | | | More exact picking for canvas editor
| * More exact picking for canvas editorBernhard Liebl2017-12-271-1/+6
| |
* | Update copyright statements to 2018Rémi Verschelde2018-01-011-2/+2
|/ | | | Happy new year to the wonderful Godot community!
* Rework the canvas_item API for further improves to the canvas item editorGilles Roudiere2017-11-191-4/+4
|
* Unify degree members and propertiesletheed2017-11-101-5/+5
|
* Use HTTPS URL for Godot's website in the headersRémi Verschelde2017-08-271-1/+1
|
* Removed unnecessary assignmentsWilson E. Alvarez2017-08-211-3/+1
|
* Added polygon antialiasing, but it does not work on nvidia. Will have to try ↵Juan Linietsky2017-08-191-2/+18
| | | | something else..
* Removes type information from method bindsIgnacio Etcheverry2017-08-101-2/+2
|