Pass a GeDynamicArray to a function
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 29/10/2008 at 02:32, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 10.1
Platform: Windows ; Mac ;
Language(s) : C++ ;---------
Hi,in my plugin object's class, I declared a GeDynamicArray as a private member:
>
class OMyObject : public ObjectData \> { \> private: \> GeDynamicArray<Vector>ClonePos; \> \> public: \> ... \> ... \> } \>
In another .cpp file (included with a .h) I have some other functions that are not members of my plugin class. One of these functions needs access to the GeDynamicArray now.
In the plugin object's cpp:
>
\> #include "myfunctions.h" \> ... \> ... \> ... \> OMyObject::GetVirtualObjects() \> { \> ... \> DoSomething(); \> } \>
In myfunctions.cpp:
>
\> void dosomething() \> { \> // Here I want to do something with the array \> } \>
I got the tip to create public Methods for getting and setting the array in my plugin class:
>
class OMyObject : public ObjectData \> { \> private: \> GeDynamicArray<Vector>ClonePos; \> \> public: \> GetArray(); \> SetArray(); \> } \>
First of all, I don't know how to do this exactly (sorry, I know this is C++ basics).
Second of all, is there really no way to pass the GeDynamicArray as a reference argument to the "dosomething" function? Passing it like a normal argument would make things so much easier, I think.
Open for suggestions and thankful for any tips and help.
Regards & Greetings,
Jack -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 30/10/2008 at 04:37, xxxxxxxx wrote:
Yes, this is C++ basics, so you can look it up for yourself. And also look for function pointers for your other problem.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 30/10/2008 at 07:39, xxxxxxxx wrote:
Got it, thanks
Cheers,
Jack