I'd like to visualize Point Density cycles node in 3D view with python. Something basic - iterate through all vertices or particles and draw a (voxel?) sphere for each of them. How is smoke visualization done in real time in the viewport? Is that accessible from python?
Smoke visualization in the viewport is based on a 3D texture, which gets mapped on a stack of coplanar planes facing the camera and using alpha-blending. You can access the raw values for density, color, etc. from the smoke domain, but i doubt this is of much use for visualization.
The point density texture works differently. In cycles it is implemented in the same way as smoke, using a 3D volumetric texture. However, it's internal data (you cannot access Cycles' own data anyway) is in the form of a kd-tree. This data structure is not accessible from the texture directly, but you could construct an equivalent tree through the bpy.mathutils.kdtree module, depending on the texture settings.