As discussed, this is one way to implement Albedo and get rid of u32 and individual u8 components in the creation of VoxelData.
Please have a look, and if it's not what you want, don't hesitate to tell me to go in another direction!
A follow up could be to make UserData also a trait and make VoxelData generic, so users of shocovox could create their own, typesafe wrappers and just need to provide a way to create a single u32 from their types.
As discussed, this is one way to implement
Albedo
and get rid ofu32
and individualu8
components in the creation ofVoxelData
.Please have a look, and if it's not what you want, don't hesitate to tell me to go in another direction!
A follow up could be to make
UserData
also a trait and makeVoxelData
generic, so users ofshocovox
could create their own, typesafe wrappers and just need to provide a way to create a singleu32
from their types.