The Open Toolkit library  1.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
OpenTK.Box2 Struct Reference

Defines a 2d box (rectangle). More...

Public Member Functions

 Box2 (Vector2 topLeft, Vector2 bottomRight)
 Constructs a new Box2 with the specified dimensions. More...
 
 Box2 (float left, float top, float right, float bottom)
 Constructs a new Box2 with the specified dimensions. More...
 
override string ToString ()
 Returns a System.String describing the current instance. More...
 

Static Public Member Functions

static Box2 FromTLRB (float top, float left, float right, float bottom)
 Creates a new Box2 with the specified dimensions. More...
 

Public Attributes

float Left
 The left boundary of the structure. More...
 
float Right
 The right boundary of the structure. More...
 
float Top
 The top boundary of the structure. More...
 
float Bottom
 The bottom boundary of the structure. More...
 

Properties

float Width [get]
 Gets a float describing the width of the Box2 structure. More...
 
float Height [get]
 Gets a float describing the height of the Box2 structure. More...
 

Detailed Description

Defines a 2d box (rectangle).

Constructor & Destructor Documentation

OpenTK.Box2.Box2 ( Vector2  topLeft,
Vector2  bottomRight 
)

Constructs a new Box2 with the specified dimensions.

Parameters
topLeftAnOpenTK.Vector2 describing the top-left corner of the Box2.
bottomRightAn OpenTK.Vector2 describing the bottom-right corner of the Box2.
OpenTK.Box2.Box2 ( float  left,
float  top,
float  right,
float  bottom 
)

Constructs a new Box2 with the specified dimensions.

Parameters
leftThe position of the left boundary.
topThe position of the top boundary.
rightThe position of the right boundary.
bottomThe position of the bottom boundary.

Member Function Documentation

static Box2 OpenTK.Box2.FromTLRB ( float  top,
float  left,
float  right,
float  bottom 
)
static

Creates a new Box2 with the specified dimensions.

Parameters
topThe position of the top boundary.
leftThe position of the left boundary.
rightThe position of the right boundary.
bottomThe position of the bottom boundary.
Returns
A new OpenTK.Box2 with the specfied dimensions.
override string OpenTK.Box2.ToString ( )

Returns a System.String describing the current instance.

Returns

Member Data Documentation

float OpenTK.Box2.Bottom

The bottom boundary of the structure.

float OpenTK.Box2.Left

The left boundary of the structure.

float OpenTK.Box2.Right

The right boundary of the structure.

float OpenTK.Box2.Top

The top boundary of the structure.

Property Documentation

float OpenTK.Box2.Height
get

Gets a float describing the height of the Box2 structure.

float OpenTK.Box2.Width
get

Gets a float describing the width of the Box2 structure.