OmegaEngine API  1.0.3
Classes | Public Member Functions | Properties | List of all members
OmegaEngine.Values.ExpandableRectangleArray< T > Class Template Reference

Builds a rectangle array that can grow in any direction. More...

Public Member Functions

void AddFirst (Point start, [NotNull] T[,] array)
 Insert a new subset array before any existing entries growing the rectangle as necessary. More...
 
void AddLast (Point start, [NotNull] T[,] array)
 Insert a new subset array after any existing entries growing the rectangle as necessary. More...
 
T [,] GetArray ()
 Returns the smallest possible array that encompasses all inserted subsets. Blanks between subsets are filled with the default value for T . More...
 
T [,] GetArray ([NotNull] T[,] baseValues)
 Returns the smallest possible array that encompasses all inserted subsets and can be backed by a base array. More...
 
T [,] GetArray ([NotNull] Grid< T > baseValues)
 Returns the smallest possible array that encompasses all inserted subsets and can be backed by a base array. More...
 

Properties

Rectangle TotalArea [get]
 The total area the rectangle currently encompasses. More...
 

Detailed Description

Builds a rectangle array that can grow in any direction.

Template Parameters
TThe type of elements to store in the array.
Type Constraints
T :struct 

Member Function Documentation

◆ AddFirst()

void OmegaEngine.Values.ExpandableRectangleArray< T >.AddFirst ( Point  start,
[NotNull] T  array[,] 
)
inline

Insert a new subset array before any existing entries growing the rectangle as necessary.

Parameters
startThe top-left coordinates of the area to insert the array into.
arrayThe array to insert. Do not modify this array after calling this method!
Returns
Values in negative areas are clipped away.

◆ AddLast()

void OmegaEngine.Values.ExpandableRectangleArray< T >.AddLast ( Point  start,
[NotNull] T  array[,] 
)
inline

Insert a new subset array after any existing entries growing the rectangle as necessary.

Parameters
startThe top-left coordinates of the area to insert the array into.
arrayThe array to insert. Do not modify this array after calling this method!
Returns
Values in negative areas are clipped away.

◆ GetArray() [1/3]

T [,] OmegaEngine.Values.ExpandableRectangleArray< T >.GetArray ( )
inline

Returns the smallest possible array that encompasses all inserted subsets. Blanks between subsets are filled with the default value for T .

Returns
An array containing the copyed data. Size will be determined by TotalArea.

◆ GetArray() [2/3]

T [,] OmegaEngine.Values.ExpandableRectangleArray< T >.GetArray ( [NotNull] T  baseValues[,])
inline

Returns the smallest possible array that encompasses all inserted subsets and can be backed by a base array.

Parameters
baseValuesAn array to query for values to fill the blanks left between subsets.
Returns
An array containing the copyed data. Size will be trimmed if baseValues is too small.

◆ GetArray() [3/3]

T [,] OmegaEngine.Values.ExpandableRectangleArray< T >.GetArray ( [NotNull] Grid< T >  baseValues)
inline

Returns the smallest possible array that encompasses all inserted subsets and can be backed by a base array.

Parameters
baseValuesAn array to query for values to fill the blanks left between subsets.
Returns
An array containing the copyed data. Size will be trimmed if baseValues is too small.

Property Documentation

◆ TotalArea

Rectangle OmegaEngine.Values.ExpandableRectangleArray< T >.TotalArea
get

The total area the rectangle currently encompasses.


The documentation for this class was generated from the following file: