Sometimes it's useful to pass around a set of values with a generic type.
The virtual array data structures allow this, but they don't have logical
ownership. My initial use case for this is as a return type for the functions
that interpolate curve attributes to evaluated points, but a need for this data
structure has come up in a few other places, and it seems generally useful
and non-problematic.
Details
Details
Diff Detail
Diff Detail
- Repository
- rB Blender
Event Timeline
Comment Actions
Various improvements
- Add copy and move constructors (and the assign versions)
- Add many comments
- Add more tests
- Remove move constructor from blender::Array (wasn't feasable with the current methods exposed in Array
- Lots of fixes
There are two remaining things:
- I'd like to be able to this: Array<GArray> arrays, currently it doesn't compile.
- I have to case the size argument to int64_t or it tries to interpret it as an allocator..
Comment Actions
- Merge branch 'master' into generic-array
- Fix comment, default variable values
- Add GVArray_For_GArray based on GVArray_For_GSpan
| source/blender/functions/FN_generic_virtual_array.hh | ||
|---|---|---|
| 409 | This constructor still has to set data_. | |
| source/blender/functions/FN_generic_virtual_array.hh | ||
|---|---|---|
| 409 | Eek, thanks! The GSpan constructor seems to work better here anyway. | |