OcTree Plugin

Typically: "How do I... ", "How can I... " questions
coppelia
Site Admin
Posts: 7396
Joined: 14 Dec 2012, 00:25

Re: OcTree Plugin

Post by coppelia » 18 May 2016, 18:08

If I take a new scene, add an Octree, then attach a non-threaded child script to it with the exact same code that you posted, I get:

Code: Select all

-----
1
100
2068422
0
What voxel size do you use? Or did you modify the octree that you added to the scene?

Cheers

formica
Posts: 52
Joined: 13 Mar 2013, 12:13

Re: OcTree Plugin

Post by formica » 31 May 2016, 08:15

Hi coppelia,
I would like to associate a custom data structure to every leaf node of the OcTree.
Do you have any idea?

Regards
Roberto

coppelia
Site Admin
Posts: 7396
Joined: 14 Dec 2012, 00:25

Re: OcTree Plugin

Post by coppelia » 01 Jun 2016, 08:50

Hi Roberto,

for that, you need to have a correspondency table that contains the Voxel tag, and your data structure, e.g.:

Code: Select all

voxelTag  voxelData
-------------------
1         yourData1
2         yourData2
3         yourData3
4         yourData4
...
Normally this would be done by allowing the user to store an own pointer to a specific data structure in each Voxel. The problem with that is that by saving the Octree, such a pointer cannot be saved, since in next load, we won't be able to establish a correspondency between pointers and data anymore.

Cheers

Post Reply