I'm playing around with voxels (https://github.com/JMG1/VoxelWorkbench), and there are a lot of them, making it laggy. Currently, this workbench uses the Part.makeCube to create each voxel geometry, that is included inside a list that creates a shape with Part.makeCompound( list ) function.
I've tried to implement the same functionality using coin3d soCube, but I don't know how to get the mouse selection of this pure coin3d objects.
If I place a cube in the scenegraph, like this example:
Code: Select all
from pivy import coin
sg = FreeCADGui.ActiveDocument.ActiveView.getSceneGraph()
col = coin.SoBaseColor()
col.rgb=(1,0,0)
cub = coin.SoCube()
myCustomNode = coin.SoSeparator()
myCustomNode.addChild(col)
myCustomNode.addChild(cub)
sg.addChild(myCustomNode)
I've have investigated pivy, coin3d and some inventor mentor codes, without success.
Regards,
Javier.