|
 |
On 08/03/2025 12:34, ingo wrote:
> kurtz le pirate <kur### [at] free fr> wrote:
>
>> So, splitting conditions seems to be the only solution with POV.
>
> But not always straight forward,
>
> #if (Z > 0 & VoxelGrid[X][Y][Z-1] > 0)
> .....
> #else
> .....
> #end
>
> after splitting #else may not be reached, where it is in the original (VoxelGrid
> = 0).
>
> #if (Z > 0)
> #if (VoxelGrid[X][Y][Z-1] > 0)
> ....
> #end
> #else
> ....
> #end
>
> it needs some thought and the code is way more complex than this. (#switch #case
> can be an alternative after turning the conditions into "states")
Of corse.
It also depends on what you want to do in the "else" case.
You can also do something like this :
#if ( VoxelGrid[X][Y][(Z>0?Z-1:OTHER)] > 0 )
More tricky
--
kurtz le pirate
compagnie de la banquise
Post a reply to this message
|
 |