-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose compute_convex_mesh_points
function to GDScript
#78871
Expose compute_convex_mesh_points
function to GDScript
#78871
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me, makes sense to expose functions we have internally that do something useful. The conversion from Array
to Vector
is what it is.
core/core_bind.cpp
Outdated
@@ -919,6 +919,17 @@ Geometry3D *Geometry3D::get_singleton() { | |||
return singleton; | |||
} | |||
|
|||
Vector<Vector3> Geometry3D::compute_convex_mesh_points(const TypedArray<Plane> &planes) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Little nitpick, naming convention wise, if we have a public function compute_convex_mesh_points
that can't be called from GDScript, we call the wrapper function that does any conversions _compute_convex_mesh_points
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(and this would be a protected method so as to not confuse what to call from C++ even if the method in GDScript does not have the _)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was going to rename this, but nothing else in core_bind.cpp follows that naming convention, so that would make this the outlier in this file.
compute_convex_mesh_points
function to GDScript
8d31a23
to
541b021
Compare
Thanks! |
A useful function that was only available in C++ before. Addresses request: godotengine/godot-proposals#6695