Age | Commit message (Collapse) | Author |
|
- Remove `Vector2.Lerp` overload that takes a weight parameter of type `Vector2`.
- Remove `Vector3.Lerp` overload that takes a weight parameter of type `Vector3`.
- Remove `Color.Lerp` overload that takes a weight parameter of type `Color`.
- Remove `Angle` method from `Vector2i`.
- Remove `AngleTo` method from `Vector2i`.
- Remove `AngleToPoint` method from `Vector2i`.
- Remove `Cross` method from `Vector2i`.
- Remove `DistanceSquaredTo` method from `Vector2i` and `Vector3i`.
- Remove `DistanceTo` method from `Vector2i` and `Vector3i`.
- Remove `Dot` method from `Vector2i` and `Vector3i`.
- Remove `PosMod` method from `Vector2i` and `Vector3i`.
- Remove `Orthogonal` method from `Vector2i`.
- Remove `&` operator from `Vector2i` and `Vector3i`.
|
|
Implement `Mathf.SinCos` that wraps a call to `System.Math.SinCos`,
this allows us to use the `SinCos` method more conveniently with
`real_t`.
Using `Math.SinCos` is often cheaper than separate calls to `Math.Sin`
and `Math.Cos`, and they are often used together.
|
|
C#: Make `Length` and `LengthSquared` into methods in `Quaternion`.
|
|
C#: Sync `Plane` with Core
|
|
C#: Add missing `Transform{2D,3D}` and `Basis` constructors
|
|
- Add `Plane(Vector3)` constructor.
- Rename `IntersectRay` to `IntersectsRay`.
- Rename `IntersectSegment` to `IntersectsSegment`.
- Replace `Center` property with `GetCenter` method.
- Add and fix documentation about the _normal_ parameter
to Core and C# documentation.
|
|
- Remove `Transform3D(Quaternion, Vector3)` constructor from C#.
- Add `Transform3D(Projection)` constructor to C#.
- Add documentation to the `Transform3D(Projection)` constructor in Core.
- Add `Transform3D` constructor with only real_t params to C# that mirrors `Transform2D`.
- Expose `Basis` constructor with only real_t params in C#.
- Add `Transform2D(real_t, Vector2, real_t, Vector2)` constructor to C#.
|
|
- Replace `Rotation` property with `GetRotation` method in `Transform2D`.
- Replace `Scale` property with `GetScale` method in `Transform2D`.
- Replace `Scale` property with `GetScale` method in `Basis`.
Core does not expose set methods.
|
|
The `Length` and `LengthSquared` members are implemented as methods
in every other C# struct, `Quaternion` was the only one implementing
them as properties.
|
|
raulsntos/dotnet/remove-spherical_interpolate_with
C#: Remove `SphericalInterpolateWith` from Transform3D
|
|
raulsntos/dotnet/intersects-without-include_borders
C#: Remove `includeBorders` parameter from `Rect2i.Intersects` and `AABB.Intersects`
|
|
- Remove `GetOrthogonalIndex` method (moved to `GridMap`).
- Remove `GetRow` and `SetRow` methods.
|
|
`AABB.Intersects`
|
|
|
|
Add `IsFinite` to C# Variants
|
|
|
|
|
|
Indenting with spaces and added a line break
Co-authored-by: Raul Santos <raulsntos@gmail.com>
|
|
Fix pingpong-loop with `loop_wrap` is not working & clean-up cubic interpolation key retrieve process
|
|
C#: Skip getting class info for unbound generics
|
|
- Avoid generic types in `ScriptPathAttributeGenerator`, this
means they won't be added to the `[AssemblyHasScripts]` attribute
and a `[ScriptPath]` attribute won't be added to the class.
Since generic classes can't be used as scripts they shouldn't use
those attributes, this also makes CSharpScript consider those types
invalid since they won't be added to the script/type map.
- Avoid generic types in `ScriptManagerBridge.LookupScriptsInAssembly`.
- Set `outMethodsDest` in `ScriptManagerBridge.UpdateScriptClassInfo`.
|
|
|
|
C#: reverse Vector2.AngleToPoint
|
|
|
|
|
|
- Renamed `ConvertToX` to `ConvertToNativeX`.
- Renamed `ConvertToXObject` to `ConvertToX`.
- Renamed `ConvertToXManaged` to `ConvertToX`.
- Fix `Signal` name in bindings generator and csharp script.
|
|
C#: Synchronize Color with Core
|
|
- Add `Luminance` readonly property.
- Add `LinearToSrgb` and `SrgbToLinear` static methods.
- Add `FromOkHsl` static method.
- Add `FromRgbe9995` static method.
- Add `FromString` static method.
- Expose `FromHtml` static method.
- Expose `HtmlIsValid` static method.
- Add and update some Color documentation.
|
|
|
|
|
|
|
|
Rename all gdnative occurences to gdextension
|
|
Non-exhaustive list of case-sensitive renames:
GDExtension -> GDNative
GDNATIVE -> GDEXTENSION
gdextension -> gdnative
ExtensionExtension ->Extension (for where there was GDNativeExtension)
EXTENSION_EXTENSION ->EXTENSION (for where there was GDNATIVE_EXTENSION)
gdnlib -> gdextension
gdn_interface -> gde_interface
gdni -> gde_interface
|
|
C#: Fix exported properties of GodotObject[] type
|
|
This was a regression from 17b2838f39c634324710166d2f36458906ecaf4a.
`MarshalUtils` was changed in the source generators to use
`ConvertTo<T>` and `CreateFrom<T>`, which don't support `GodotObject[]`
because it would need reflection.
As such, we need to keep the custom cases for `GodotObject[]` in
`MarshalUtils`.
|
|
- Exposes the properties of C# attribute so they can be accessed from
reflection, renaming them to PascalCase to follow .NET conventions.
- Added some documentation to the newly exposed members.
- Made attribute properties readonly to avoid giving the impression that
they could be modified.
|
|
Godot floats are always 64-bit.
The real_t feature only affects vectors, not scalars.
|
|
This commit replaces most usages of `ConvertManagedObjectToVariant` and
`ConvertVariantToManagedObjectOfType`, by using the `Godot.Variant`
struct instead of `System.Object`.
The most notable change is to the `GetGodotPropertyDefaultValues` method
that's generated for scripts. The dictionary it returns now stores
`Godot.Variant` values.
Remaining usages are:
- The `DelegateUtils` class, for the serialization of closure display
classes during assembly reloading by the editor. These display classes
are compiler generated classes to store values captured by a closure.
Since it's generated by the compiler, the only way we have to access
the fields is through reflection. This leads to using `System.Object`.
- Converting parameters when invoking constructors from the engine.
This will be replaced with source generators in the future.
- Legacy support for old `GetGodotPropertyDefaultValues` return values.
We need to keep supporting the old version of this generated method
for some time. Otherwise, if loading a project built with the previous
version, it could lead to the loss of exported property values.
Ideally, we should remove this legacy support before a stable release.
|
|
Its two usages were:
- The Array `ICollection.CopyTo` implementation.
It's possible that this class shouldn't be implementing the
non-generic `ICollection`, but this commit doesn't change that.
The new implementation stores the elements as boxed `Variant` values.
- The `Variant.Obj` property.
I'm not sure if this property's existence is justified, but for now
I rewrote it as a simpler version of `ConvertVariantToManagedObject`.
|
|
C#: Fix marshaling generic Godot collections
|
|
C#: Cleanup and sync StringExtensions with core
|
|
- Removed `UnicodeAt`
- Removed `EndsWith`
- Removed `LPad` and `RPad`
- Deprecated `BeginsWith` in favor of `string.StartsWith`
- Deprecated `LStrip` and `RStrip` in favor of `string.TrimStart` and `string.TrimEnd`
|
|
C#: Remove VariantSpanDisposer and use constants in stackalloc
|
|
- Remove `VariantSpanDisposer`, no need to dispose of the Variant Spans
since we are now borrowing the Variants instead of copying them.
- Remove `VariantSpanExtensions.Cleared` that was only used so the
Span was initialized for `VariantSpanDisposer` to know what to dispose.
- Fix stackalloc Spans to use constant VarArgsSpanThreshold
and avoid bound checks.
|
|
Fix `VariantUtils.UnsupportedType` method throwing
|
|
C#: Add `global::` namespace to generated source
|
|
This method was not supposed to throw, just return the new constructed
exception so it can be thrown by the caller.
|
|
Adds `global::` to the fully qualified types in source generators to
prevent ambiguity.
|
|
C#: Optimize Variant conversion callbacks
|
|
- Replaced `MD5Buffer`, `MD5Text`, `SHA256Buffer` and `SHA256Text` implementation to use the `System.Security.Cryptography` classes and avoid marshaling.
- Added `SHA1Buffer` and `SHA1Text`.
- Renamed `ToUTF8` to `ToUTF8Buffer`.
- Renamed `ToAscii` to `ToASCIIBuffer`.
- Added `ToUTF16Buffer` and `ToUTF32Buffer`.
- Added `GetStringFromUTF16` and `GetStringFromUTF32`.
|