- changed status to resolved
Simplified interface to TerrainVolume
Issue #28
resolved
The use of material weights is conceptually complex compared to other voxel engines which simply store a density value and material ID for each voxel. Of course, we can actually emulate this by simply making sure only one weight has a non-zero value, and setting this to the required density. A function to do this might make the API a little easier to understand.
Something like:
setDensityandMaterialID(int x, int y, int z, byte density, byte materialID) { MaterialSet materialSet(); materialSet.weights[materialID]= density; setVoxel(x, y, z, materialSet); }
What should the reading equivalents be? Maybe getDensity() and getMainMaterial()?
Comments (1)
-
reporter - Log in to comment
This is a feature rather than a bug - moving to Trello: https://trello.com/c/ZEu3l5gN/13-simplified-interface-to-terrainvolume