LocalL16ScalarArray (struct)

The LocalL16ScalarArray is an efficient container for storing Scalar values, where up to 16 values can be added without requiring memory allocations on the heap. This allows to efficiently contain array of values, where arrays are usually smaller than 16.

注釈

Avoiding frequent heap memory allocations can have a significant performance impact. Using this type can avoid the memory allocation overhead in some scenarios (eg: various PolygonMesh methods use local arrays).

LocalL16ScalarArray LocalL16ScalarArray LocalL16ScalarArray

Members

Scalar[16] first16  
Scalar[] others  
UInt32 count  

Methods

  LocalL16ScalarArray ( in LocalL16ScalarArray other )
  LocalL16ScalarArray ()
LocalL16ScalarArray clone ? ()
Scalar get ? ( in UInt32 index )
String getString ? ()
  push ! ( in Scalar value )
  resize ! ( in UInt32 size )
  set ! ( in UInt32 index, in Scalar value )
UInt32 size ? ()

Operators

LocalL16ScalarArray = ( Param other )

Methods in detail

LocalL16ScalarArray ( in LocalL16ScalarArray other )

copy constructor


LocalL16ScalarArray ()

default constructor


LocalL16ScalarArray LocalL16ScalarArray.clone? ()

clone method


Scalar LocalL16ScalarArray.get? ( in UInt32 index )

returns the value stored at an index.


String LocalL16ScalarArray.getString? ()

returns a description of the array as a String


LocalL16ScalarArray.push! ( in Scalar value )

appends a new Scalar value to the end of the array


LocalL16ScalarArray.resize! ( in UInt32 size )

resizes the array.


LocalL16ScalarArray.set! ( in UInt32 index, in Scalar value )

sets the value stored at an index


UInt32 LocalL16ScalarArray.size? ()

returns the size of the array (number of Scalar elements stored).

Operators in detail

LocalL16ScalarArray = ( Param other )

copy the content of another LocalL16ScalarArray