summaryrefslogtreecommitdiffstats
path: root/core/variant/variant_construct.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add ValidatedCall to MethodBindJuan Linietsky2023-04-301-0/+11
| | | | | | | * This should optimize GDScript function calling _enormously_. * It also should simplify the GDScript VM considerably. NOTE: GDExtension calling performance has most likely been affected until going via ptrcall is fixed.
* 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".
* Merge pull request #62814 from KoBeWi/strintRémi Verschelde2022-11-151-0/+2
|\ | | | | | | Restore numeric from String constructors
| * Restore numeric from String constructorskobewi2022-09-191-0/+2
| |
* | Replace Quaternion Euler constructor with `from_euler` methodAaron Franke2022-11-011-1/+0
| |
* | [GDExtension] Implement support for typed arrays.bruvzg2022-09-221-0/+1
|/
* Add constructor accepting four Vector4's to `Projection`Yuri Rubinsky2022-08-241-0/+1
|
* Implement Vector4, Vector4i, Projectionreduz2022-07-231-0/+15
| | | | | | | | | | | | | Implement built-in classes Vector4, Vector4i and Projection. * Two versions of Vector4 (float and integer). * A Projection class, which is a 4x4 matrix specialized in projection types. These types have been requested for a long time, but given they were very corner case they were not added before. Because in Godot 4, reimplementing parts of the rendering engine is now possible, access to these types (heavily used by the rendering code) becomes a necessity. **Q**: Why Projection and not Matrix4? **A**: Godot does not use Matrix2, Matrix3, Matrix4x3, etc. naming convention because, within the engine, these types always have a *purpose*. As such, Godot names them: Transform2D, Transform3D or Basis. In this case, this 4x4 matrix is _always_ used as a _Projection_, hence the naming.
* Core: Rename math 'phi' arguments to 'angle'Rémi Verschelde2022-05-051-1/+1
|
* Style: Partially apply clang-tidy's `cppcoreguidelines-pro-type-member-init`Rémi Verschelde2022-05-021-5/+5
| | | | | | | | | | | Didn't commit all the changes where it wants to initialize a struct with `{}`. Should be reviewed in a separate PR. Option `IgnoreArrays` enabled for now to be conservative, can be disabled to see if it proposes more useful changes. Also fixed manually a handful of other missing initializations / moved some from constructors.
* Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | Happy new year to the wonderful Godot community!
* Refactored Node3D rotation modesreduz2021-10-251-2/+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).
* Swap args of Plane(point, normal) constructormennomax2021-10-151-1/+2
| | | | Now (normal, point)
* Expose get_skew for transform2d and add new constructorVincent D2021-09-191-0/+1
| | | | | | | | | | Expose set_scale and set_skew for transform2d Replacing float by real_t Adding const parameters Updated transform2d doc
* Make some variant internal functions public.reduz2021-06-171-537/+1
| | | | | -Make constructors, ops and setget inline functions public -Should help optimizing the GDScript VM
* Rename Reference to RefCountedPedro J. Estébanez2021-06-111-3/+3
|
* Rename Quat to QuaternionMarcel Admiraal2021-06-041-9/+9
|
* Rename Transform to Transform3D in coreAaron Franke2021-06-031-5/+5
|
* Add missing ERR_FAIL_INDEX check to Variant::constructAlex Hirsch2021-03-041-0/+1
| | | | | | | | Other functions in the same file validate parameters using the ERR_FAIL macros. This validation was missing for Variant::construct resulting in a crash when called with invalid data (p_type < 0). fix #46067
* Replace ColorN and from HTML with a string constructorAaron Franke2021-02-011-0/+2
|
* 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 #44406 from vnen/variant-ptr-constructRémi Verschelde2020-12-151-10/+64
|\ | | | | Add PtrConstruct template to use in Variant constructors
| * Add PtrConstruct template to use in Variant constructorsGeorge Marques2020-12-151-10/+64
| | | | | | | | | | Since the PtrToArg::encode requires the value to be constructed previously. With PtrConstruct this is not required.
* | Use pointer parameters in Variant function pointersGeorge Marques2020-12-101-30/+30
|/ | | | | | Instead of references. This is needed because those function pointers are used in GDNative which needs to work with plain C, which doesn't support passing parameters by reference.
* Fix VariantInternal initialization and setting of objectGeorge Marques2020-11-301-10/+15
| | | | | | - Initialize Object pointer to nullptr so it's not used by mistake. - When setting an Object check if it's a reference so refcounting works as intended.
* Create Variant built-in functions.reduz2020-11-101-20/+0
| | | | | | | -Moved Expression to use this, removed its own. -Eventually GDScript/VisualScript/GDNative need to be moved to this. -Given the JSON functions were hacked-in, removed them and created a new JSONParser class -Made sure these functions appear properly in documentation, since they will be removed from GDScript
* Variant: Sync docs with new constructors, fixups after #43403Rémi Verschelde2020-11-091-3/+14
| | | | | Change DocData comparators for MethodDoc and ArgumentDoc to get a better ordering of constructors.
* Change how no-arg constructor is handled internally in Variant.reduz2020-11-091-97/+137
|
* Merge pull request #43415 from bruvzg/var_ctr_af32Rémi Verschelde2020-11-091-1/+1
|\ | | | | Fix duplicate variant constructor typo.
| * Fix duplicate variant constructor typo.bruvzg2020-11-091-1/+1
| |
* | Variant: Rename Type::_RID to Type::RIDRémi Verschelde2020-11-091-2/+2
|/ | | | | | | | The underscore prefix was used to avoid the conflict between the `RID` class name and the matching enum value in `Variant::Type`. This can be fixed differently by prefixing uses of the `RID` class in `Variant` with the scope resolution operator, as done already for `AABB`.
* Refactored variant constructor logicreduz2020-11-091-0/+781