OpenTK.Box2 Struct Reference

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

List of all members.

Public Member Functions

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

Static Public Member Functions

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

Public Attributes

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

Properties

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

Detailed Description

Defines a 2d box (rectangle).

Definition at line 17 of file Box2.cs.


Constructor & Destructor Documentation

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

Constructs a new Box2 with the specified dimensions.

Parameters:
topLeft AnOpenTK.Vector2 describing the top-left corner of the Box2.
bottomRight An OpenTK.Vector2 describing the bottom-right corner of the Box2.

Definition at line 44 of file Box2.cs.

00045         {
00046             Left = topLeft.X;
00047             Top = topLeft.Y;
00048             Right = topLeft.X;
00049             Bottom = topLeft.Y;
00050         }

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

Constructs a new Box2 with the specified dimensions.

Parameters:
left The position of the left boundary.
top The position of the top boundary.
right The position of the right boundary.
bottom The position of the bottom boundary.

Definition at line 59 of file Box2.cs.

00060         {
00061             Left = left;
00062             Top = top;
00063             Right = right;
00064             Bottom = bottom;
00065         }


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:
top The position of the top boundary.
left The position of the left boundary.
right The position of the right boundary.
bottom The position of the bottom boundary.
Returns:
A new OpenTK.Box2 with the specfied dimensions.

Definition at line 75 of file Box2.cs.

00076         {
00077             return new Box2(left, top, right, bottom);
00078         }

override string OpenTK.Box2.ToString (  ) 

Returns a System.String describing the current instance.

Returns:

Definition at line 94 of file Box2.cs.

00095         {
00096             return String.Format("({0},{1})-({2},{3})", Left, Top, Right, Bottom);
00097         }


Member Data Documentation

The bottom boundary of the structure.

Definition at line 37 of file Box2.cs.

The left boundary of the structure.

Definition at line 22 of file Box2.cs.

The right boundary of the structure.

Definition at line 27 of file Box2.cs.

The top boundary of the structure.

Definition at line 32 of file Box2.cs.


Property Documentation

float OpenTK.Box2.Height [get]

Gets a float describing the height of the Box2 structure.

Definition at line 88 of file Box2.cs.

float OpenTK.Box2.Width [get]

Gets a float describing the width of the Box2 structure.

Definition at line 83 of file Box2.cs.

 All Classes Functions Variables Enumerations Properties Events

Generated on Tue Mar 9 14:59:14 2010 for The Open Toolkit library by  doxygen 1.6.1