summaryrefslogtreecommitdiffstats
path: root/scene/3d/cpu_particles_3d.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Rename Curve/Curve2D/Curve3D/Gradient `interpolate()` to `sample()`Hugo Locurcio2022-08-301-18/+18
| | | | | "sampling" is a more accurate term than "interpolating" for what's happening when using that function.
* Merge pull request #64367 from Mickeon/rename-var-to-strRémi Verschelde2022-08-261-5/+5
|\ | | | | Rename `str2var` to `str_to_var` and similar
| * Rename `str2var` to `str_to_var` and similarMicky2022-08-261-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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`
* | Rename ParticlesMaterial to ParticleProcessMaterialMicky2022-08-261-15/+15
|/ | | | Also affects their file names, related classes and documentation.
* Make `_validate_property` a multilevel methodYuri Sizov2022-08-221-17/+15
|
* Particles: Fix missing configuration warning updatesRémi Verschelde2022-07-031-1/+10
| | | | Fixes #33488.
* Use suffixes for units in nodes and resourcesAaron Franke2022-05-191-3/+3
|
* Rename Basis get_axis to get_column, remove redundant methodsAaron Franke2022-05-031-20/+20
|
* Rename Basis "elements" to "rows"Aaron Franke2022-04-291-18/+18
|
* String: Remove TTR and DTR defines in non-tools buildRémi Verschelde2022-03-281-2/+2
| | | | | This ensures we don't use TTR in runtime code, as it's specifically meant to source translations for the editor.
* Merge pull request #55399 from RPicster/particlesmaterial-sphere-emittershapeRémi Verschelde2022-03-181-2/+10
|\ | | | | ParticleMaterial: Sphere emission shape emitting from the volume.
| * Fixed sphere emission shape to emit particles in a spheres volume and added ↵Raffaele Picca2021-12-061-2/+10
| | | | | | | | "Sphere Surface" to keep the old behaviour.
* | 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.
* | Use `switch` consistently in `_notification` (`scene` folder)Rémi Verschelde2022-02-151-49/+51
| |
* | Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | | | | | Happy new year to the wonderful Godot community!
* | Merge pull request #55263 from RPicster/ParticleMaterial-random-start-colorRémi Verschelde2021-12-101-1/+24
|\ \
| * | Random initial color parameter for ParticleMaterialRaffaele Picca2021-12-031-1/+24
| |/ | | | | | | Works with 2D and 3D GPU Particles
* | Add a double-precision editor build to CIAaron Franke2021-12-091-2/+2
| |
* | Fixed texture animation speed when using random lifetime ( Particle2D gpu + ↵Raffaele Picca2021-11-261-11/+11
|/ | | | cpu) as mentioned here: https://github.com/godotengine/godot/issues/54993
* Rename `GradientTexture` to `GradientTexture1D`Andrii Doroshenko (Xrayez)2021-11-071-1/+1
| | | | | 1. Explicit and unambiguous when comparing to `GradientTexture2D` 2. Consistent with other class names where 1D is used in the engine.
* clang-format: Disable alignment of operands, too unreliableRémi Verschelde2021-10-281-2/+1
| | | | | | | | | Sets `AlignOperands` to `DontAlign`. `clang-format` developers seem to mostly care about space-based indentation and every other version of clang-format breaks the bad mismatch of tabs and spaces that it seems to use for operand alignment. So it's better without, so that it respects our two-tabs `ContinuationIndentWidth`.
* Refactored Node3D rotation modesreduz2021-10-251-0/+2
| | | | | | | | | * 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).
* Setting the visible multimesh instance to -1 so that they are updated ↵Hristo Stamenov2021-10-241-0/+1
| | | | | | | | correctly on set_amount. When emitting stops CPUParticles3D::_set_redraw(bool p_redraw) will set that value to 0 so when you change the amount after that it will actually not update correclty. This fixes an issue where if it was not emitting when the scene loaded and it start after that the amount is not reflected correclty. This also happened when you checked out the box for emitting in the editor, changed the value of amount and then checked on the box for emitting. With this change if it is emitting during the change it does interrupt the previous particles when you change. The amount and the emit starts from beginning but that is to be expected on an amount of particles change.
* moved particle parameters to minmax and split scale axisQbieShay2021-08-221-79/+181
| | | | | | | This commit adds quite a chunk of modifications to particles - particle (value + randomness) now use min and max instead - passing a curveXYZtexture is now possible and will scale particles per-axis - CPUParticle3D have an optional parameter to split the scale curve per-axis
* Fix some unnecessary includesAaron Franke2021-08-131-1/+1
|
* Fix CPU Particles spreadMorris Tabor2021-08-121-6/+19
| | | | Same as https://github.com/godotengine/godot/pull/51565 but ported to master.
* Some work on double supportAaron Franke2021-08-091-2/+2
|
* Use doubles for time in many other placesAaron Franke2021-08-091-23/+23
|
* Use real_t in 3D nodesAaron Franke2021-08-031-69/+69
|
* Merge pull request #50370 from QbieShay/circle-emitter-particleRémi Verschelde2021-07-211-2/+74
|\ | | | | Ring emitter for 4.0
| * This commits adds a new emitter type for particles materialQbieShay2021-07-111-2/+74
| | | | | | | | | | | | | | | | | | | | | | | | and 3D CPU particles. The new emitter is called "ring" and it can emit either in a ring or cylinder fashion. This adds the following properties for the emitter: 1. emission_ring_axis: the axis along which the ring/cylinder will be constructed 2. emission_ring_radius: outer radius of the ring/cylinder 3. emission_ring_inner_radius: inner radius of the cylinder. when set to zero, particles will emit in the full volume. 4. emission_ring_height: height of the ring/cylinder emitter.
* | Merge pull request #38317 from verdog/get-cam-2d-4.0Rémi Verschelde2021-07-201-1/+1
|\ \ | | | | | | add viewport.get_camera_2d()
| * | add viewport.get_camera_2d()Josh Chandler2021-07-031-1/+1
| |/ | | | | | | | | | | * there is now a more clear distinction between camera_2d and camera_3d functions in the engine code * simplified camera2d's exported interface - now everything happens directly with the 'current' variable and make_current and clear_current are no longer exposed- there were some situations where calling one instead of set_current would result in incomplete results * rebased to current godot master
* / Fix color properties of particle nodes/materialHendrik Brucker2021-07-041-4/+0
|/
* Use PROPERTY_USAGE_NONE instead of 0 for no property usageAaron Franke2021-07-011-6/+6
| | | | Also use const more often.
* Fix editor suffixes and degrees conversionreduz2021-06-301-4/+4
| | | | | | | | | | | | | * 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 Transform to Transform3D in coreAaron Franke2021-06-031-4/+4
|
* Core: Drop custom `copymem`/`zeromem` definesRémi Verschelde2021-04-271-2/+2
| | | | | | | | We've been using standard C library functions `memcpy`/`memset` for these since 2016 with 67f65f66391327b2967a20a89c3627e1dd6e84eb. There was still the possibility for third-party platform ports to override the definitions with a custom header, but this doesn't seem useful anymore.
* Use Array for node configuration warningsNathan Franke2021-04-111-10/+4
| | | | Previously, the warnings were passed as a string and delimitation of which were hard coded at each implementation.
* Modernize atomicsPedro J. Estébanez2021-02-181-4/+19
| | | | | | | | | | - Based on C++11's `atomic` - Reworked `SafeRefCount` (based on the rewrite by @hpvb) - Replaced free atomic functions by the new `SafeNumeric<T>` - Replaced wrong cases of `volatile bool` by the new `SafeFlag` - Platform-specific implementations no longer needed Co-authored-by: Hein-Pieter van Braam-Stewart <hp@tmm.cx>
* add null check in _update_particle_data_buffer()Angad Kambli2021-02-171-0/+2
| | | | add check to see if p_order is in range for CPUParticles3D::set_draw_order'
* Removed _change_notifyreduz2021-02-101-2/+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-1/+1
| | | | | | | | | -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 variables with default values in scene/ [1/2]Rafał Mikrut2021-02-071-40/+1
|
* Merge pull request #45496 from Chaosus/fix_particlesRémi Verschelde2021-02-031-15/+19
|\ | | | | Fix particles not properly updated by their lifetime
| * Fix particles not properly modified by their lifetimeYuri Roubinsky2021-01-271-15/+19
| |
* | Use Math_TAU and deg2rad/rad2deg in more places and optimize codeAaron Franke2021-01-091-7/+8
|/
* 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 🎆
* Rename Vector2.tangent() to Vector2.orthogonal()Marcel Admiraal2020-12-061-1/+1
|
* Rename Particles/ParticlesMaterial "Flags" enum to "ParticleFlags"Aaron Franke2020-12-041-36/+36
| | | "Flags" was a bit too ambiguous, and in 3D it hid GeometryInstance.Flags