Re: improvement of index-calculation



To be sure. You mean an array[0..2] of Integer?

or a record.

I think this is not possible because this is a
Getter mehtod for a property

property Cells[const x,y,z:integer]:boolean
  read GetVoxelFromXYZ
  write SetVoxelFromXYZ;

It's possible to use an array, a record or any type in getter/setter method for a property as long as these match the indexes for the property (you're not limited to native types).


If everywhere else in the code you manipulate coordinates as independant variables (as in "x,y,z:integer"), then there is no benefit to using a record or array here, but if you use something like xyz:TVector,
then this would benefit here (and using a structure might benefit the rest of the code as well for the same reasons).


Eric
.