OmegaEngine API  1.0.3
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
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, set]
 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

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.
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.
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.
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.
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

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

The total area the rectangle currently encompasses.


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