Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
Author | Text | ||||
|
Hi there, you know we can get child nodes from a parent node by using ccbGetChildSceneNode Would there be otherwise any solution for getting the parent node of from child node? Unfortunately "ccbGetParentSceneNode" doesn't exist in CopperCube's scripting reference. Checking an array of all scene nodes might consume lots of resources for the purpose I guess? Thanks for any ideas. |
||||
|
This checks the entire scene recursively, with a depth max of ten. When too slow, try run it once to write each child with its parent to a simple array (or two arrays, with corresponding indicies), Wouldn't worry about a few hundred bytes in resources.
|
||||
|
Once you know what kind of software you need, you can determine how much the process will cost. The cost of custom software development depends on the size of the software and the developer's availability. Generally, small software solutions are ten to fifteen pages, while larger ones are more than forty pages. As the size of your software increases, so does its complexity. A larger program will require more human resources and more time to develop. But if you have a specific vision and a specific aim for the application, you will get a better return on your investment https://mlsdev.com/services/web-.... |
||||
|
You're welcome. Notice when using recursive function calls (when a function calls itself) there is always some risk of a stack overflow (and crash), for example when there is an internal loop between a parent-child relation. Therefor the count_recursive variable makes sure there's a limit to the recursion depth. That variable must be declared outside the function, so it keeps it's value when the function ends = is kind of global (contrary to local). |
|