Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Custom Spots Filter Generator Module
#4
Hi

Thanks for sharing the solution.

Do you have any thoughts or suggestions about the SubArray struct?
To avoid such issues, I could hide SubArray.Array to the public, while providing an indexer:

Code:
        /// <summary>
        ///  Returns the array element at the given index
        /// </summary>
        public T this[int index]
        {
            get => Array[index];
            set => Array[index] = value;
        }

The issue with this being that SubArray, and the whole array pooling thing, are heavily orientated towards performance. So I prefer to keep the SubArray.Array public to allow for better performance. But I see that it can lead to confusion. I purposely named SubArray.Count that way, instead of Length, to avoid accidentally using the Length of SubArray.Array instead of the one of SubArray.
Anything thoughts?

PS: I will provide that indexer in the next update
Please consider leaving a review for Curvy Splines, this helps immensely. Thank you.
Reply


Messages In This Thread
Custom Spots Filter Generator Module - by mercior - 03-09-2023, 05:41 PM
RE: Custom Spots Filter Generator Module - by _Aka_ - 03-10-2023, 10:20 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Generator gameobjects missing offset and rotated beewhale 4 58 08-20-2026, 10:56 PM
Last Post: _Aka_
  Spline Spots from 2 samples. BitBlit 8 913 06-30-2026, 11:49 AM
Last Post: _Aka_
  Replace deform mesh on volume spots Kokoriko49 1 2,573 06-09-2025, 06:49 PM
Last Post: _Aka_
  How to rotate generator asteroids patndan74 6 4,358 05-08-2025, 10:07 PM
Last Post: _Aka_

Forum Jump: