godot_dart icon indicating copy to clipboard operation
godot_dart copied to clipboard

Reimplement certain Builtin types in Dart

Open fuzzybinary opened this issue 2 years ago • 0 comments

godot-cpp doesn't generate a lot of the builtin types, especially the math heavy ones, as going back and forth through the Godot calling system would be cumbersome. Instead, they re-implement them in C++

We should take a similar approach in Dart, only copying values out to opaque memory when needed. The classes that should get this treatment are:

  • aabb
  • basis
  • color
  • plane
  • projection
  • quaternion
  • rect2
  • rect2i
  • transform2d
  • transform3d
  • vector2
  • vector2i
  • vector3
  • vector3i
  • vector4
  • vector4i

This will also allow us to simplify their interfaces, including allowing default parameters for constructors instead of using named constructors for everything but the default.

fuzzybinary avatar Jun 07 '23 21:06 fuzzybinary