Chunks
Moddable voxel sandbox for room-scale VR.
Public Member Functions | Static Public Member Functions | Properties | List of all members
Chunks.Controls.Bounds Struct Reference

Used in controls to describe an axis aligned rectangle. More...

Public Member Functions

 Bounds (float vals)
 Creates a Bounds with the same value for all 4 extremities. More...
 
 Bounds (float xVals, float yVals)
 Creates a Bounds with the same value for both horizontal extremities, and another value for both vertical extremities. More...
 
 Bounds (Vector min, Vector max)
 Creates a Bounds with the given minimum and maximum extremities. More...
 
 Bounds (float minX, float minY, float maxX, float maxY)
 Creates a Bounds with specific values for each of the 4 extremities. More...
 
bool Contains (float x, float y)
 
bool Contains (Vector pos)
 
override string ToString ()
 Returns a string representation of the Bounds. More...
 

Static Public Member Functions

static Bounds Union (Bounds a, Bounds b)
 Finds the smallest Bounds that surrounds the two given bounds. More...
 
static Bounds Intersection (Bounds a, Bounds b)
 Finds the largest Bounds that is contained within the two given bounds. More...
 

Properties

float MinX [get, set]
 Left-most extremity of the Bounds. More...
 
float MinY [get, set]
 Upper-most extremity of the Bounds. More...
 
float MaxX [get, set]
 Right-most extremity of the Bounds. More...
 
float MaxY [get, set]
 Lower-most extremity of the Bounds. More...
 
bool IsValid [get]
 Checks to see if the maximum extremities are not smaller than the minimum extremities. More...
 
float Width [get]
 Difference between the right and left extremities of the Bounds. More...
 
float Height [get]
 Difference between the lower and upper extremities of the Bounds. More...
 
Vector Size [get]
 The horizontal and vertical size of the bounds. More...
 
Vector Min [get, set]
 The upper left corner of the Bounds. More...
 
Vector Max [get, set]
 The lower right corner of the Bounds. More...
 
Vector Center [get]
 The mid-point of the Bounds. More...
 

Detailed Description

Used in controls to describe an axis aligned rectangle.

Constructor & Destructor Documentation

Chunks.Controls.Bounds.Bounds ( float  vals)

Creates a Bounds with the same value for all 4 extremities.

Parameters
valsValue to use for each extremity.
Chunks.Controls.Bounds.Bounds ( float  xVals,
float  yVals 
)

Creates a Bounds with the same value for both horizontal extremities, and another value for both vertical extremities.

Parameters
xValsValue to use for horizontal extremities.
yValsValue to use for vertical extremities.
Chunks.Controls.Bounds.Bounds ( Vector  min,
Vector  max 
)

Creates a Bounds with the given minimum and maximum extremities.

Parameters
minUpper left extremity.
maxLower right extremity.
Chunks.Controls.Bounds.Bounds ( float  minX,
float  minY,
float  maxX,
float  maxY 
)

Creates a Bounds with specific values for each of the 4 extremities.

Parameters
minXLeft-most extremity of the Bounds.
minYUpper-most extremity of the Bounds.
maxXRight-most extremity of the Bounds.
maxYLower-most extremity of the Bounds.

Member Function Documentation

bool Chunks.Controls.Bounds.Contains ( float  x,
float  y 
)
bool Chunks.Controls.Bounds.Contains ( Vector  pos)
static Bounds Chunks.Controls.Bounds.Intersection ( Bounds  a,
Bounds  b 
)
static

Finds the largest Bounds that is contained within the two given bounds.

Parameters
aFirst Bounds to intersect.
bSecond Bounds to intersect.
override string Chunks.Controls.Bounds.ToString ( )

Returns a string representation of the Bounds.

static Bounds Chunks.Controls.Bounds.Union ( Bounds  a,
Bounds  b 
)
static

Finds the smallest Bounds that surrounds the two given bounds.

Parameters
aFirst Bounds to include.
bSecond Bounds to include.

Property Documentation

Vector Chunks.Controls.Bounds.Center
get

The mid-point of the Bounds.

float Chunks.Controls.Bounds.Height
get

Difference between the lower and upper extremities of the Bounds.

bool Chunks.Controls.Bounds.IsValid
get

Checks to see if the maximum extremities are not smaller than the minimum extremities.

Vector Chunks.Controls.Bounds.Max
getset

The lower right corner of the Bounds.

float Chunks.Controls.Bounds.MaxX
getset

Right-most extremity of the Bounds.

float Chunks.Controls.Bounds.MaxY
getset

Lower-most extremity of the Bounds.

Vector Chunks.Controls.Bounds.Min
getset

The upper left corner of the Bounds.

float Chunks.Controls.Bounds.MinX
getset

Left-most extremity of the Bounds.

float Chunks.Controls.Bounds.MinY
getset

Upper-most extremity of the Bounds.

Vector Chunks.Controls.Bounds.Size
get

The horizontal and vertical size of the bounds.

float Chunks.Controls.Bounds.Width
get

Difference between the right and left extremities of the Bounds.


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