heyx3 / Bplus.jl

A modern OpenGL 4.6 rendering framework, written in Julia.
Other
70 stars 3 forks source link

Add some missing optional parameters for the second `sample_field!()` overload, with `MultiField` #4

Open heyx3 opened 1 year ago

heyx3 commented 1 year ago

When sampling from a single field into a single array with sample_field!(), you can specify an array_bounds to only cover a subset of the array (defaulting to the full array), and also a sample_space describing the bounds of the space covered by the full array (defaulting to 0-1 along every axis).

The other overload of sample_field!(), for a MultiField (which contains a sequence of fields that can feed into each other) should copy have this functionality.

  1. The last field in the sequence, which gets written into the output array, should get a corresponding array_bounds parameter to make it only cover a subset of the output array.
  2. Every field in the sequence, including the final one, should get a corresponding sample_space parameter to customize the range of positions it samples over.