Applying the class reference documentation to C++
Asked Answered
M

2

0

I am developing a gdextension. I'm one of those people who cannot live without C++. Also, I'm binding to other, external C++ libraries.

Let's say in my C++ code I have a Transform3D called t and a Vector3 called v. Now I want to apply the transform to the vector. According to the documentation of Transform3D it has a Vector3 operator * ( Vector3 right ) which multiplies the Vector3 by the Transform3D. So I expect to be able to say t * v. However, when I do that the compiler complains that such an operator* does not exist. In fact, when I look at the source code for Transform3D, the operator does not exist.

It seems that instead calling t.xform (v) does what I intended.

I have some questions. Help is much appreciated.

What language(s) does the class reference apply to?

How does the class reference relate to the C++ code?

How do I, in the general case, find out how to implement, in C++, the features described in the class reference?

Mandrel answered 4/10, 2023 at 15:57 Comment(0)
A
0

What language(s) does the class reference apply to?

The online docs are for GDScript.

The Godot C++ interfaces are defined here: https://github.com/godotengine/godot-cpp

Adolphadolphe answered 4/10, 2023 at 18:8 Comment(0)
M
0

Adolphadolphe The online docs are for GDScript.

What about C#?

Mandrel answered 6/10, 2023 at 8:48 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.