Public Member Functions | Static Public Member Functions | Public Attributes | Properties

Romulus.CellIndex Struct Reference

Defines a location within a grid. More...

List of all members.

Public Member Functions

 CellIndex (int x, int y)
 Creates a new CellIndex.
Point AsPoint ()
 Convert a CellIndex to a Point.
override bool Equals (object obj)
 Compares two objects for equality.
bool Equals (CellIndex p)
 Compares this CellIndex to another CellIndex.
override int GetHashCode ()
 Gets a hashcode for this object.

Static Public Member Functions

static CellIndex FromPoint (Point value)
 Converts a point to a CellIndex.
static bool operator== (CellIndex a, CellIndex b)
 Defines the == operator between two CellIndex objects.
static bool operator!= (CellIndex a, CellIndex b)
 Defines the != operator between two CellIndex objects.
static operator Point (CellIndex c)
 Defines an explicit conversion from CellLocation to Point.
static operator CellIndex (Point p)
 Defines an explicit conversion from Point to CellLocation.

Public Attributes

Point value
 Underlying value.

Properties

int X [get, set]
 The X coordinate.
int Y [get, set]
 The Y coordinate.

Detailed Description

Defines a location within a grid.


Constructor & Destructor Documentation

Romulus.CellIndex.CellIndex ( int  x,
int  y 
)

Creates a new CellIndex.

Parameters:
x The X coordinate.
y The Y coordinate.

Member Function Documentation

Point Romulus.CellIndex.AsPoint (  ) 

Convert a CellIndex to a Point.

Returns:
A new Point object.
bool Romulus.CellIndex.Equals ( CellIndex  p  ) 

Compares this CellIndex to another CellIndex.

Parameters:
p The CellIndex to compare to.
Returns:
A boolean indicating equality.
override bool Romulus.CellIndex.Equals ( object  obj  ) 

Compares two objects for equality.

Parameters:
obj The object to compare.
Returns:
A boolean indicating equality.
static CellIndex Romulus.CellIndex.FromPoint ( Point  value  )  [static]

Converts a point to a CellIndex.

Parameters:
value The point to convert.
Returns:
A new CellIndex object.
override int Romulus.CellIndex.GetHashCode (  ) 

Gets a hashcode for this object.

Returns:
A number.
static Romulus.CellIndex.operator CellIndex ( Point  p  )  [explicit, static]

Defines an explicit conversion from Point to CellLocation.

Parameters:
p The value to covert.
Returns:
The converted value.
static Romulus.CellIndex.operator Point ( CellIndex  c  )  [explicit, static]

Defines an explicit conversion from CellLocation to Point.

Parameters:
c The value to covert.
Returns:
The converted value.
static bool Romulus.CellIndex.operator!= ( CellIndex  a,
CellIndex  b 
) [static]

Defines the != operator between two CellIndex objects.

Parameters:
a The first CellIndex to compare.
b The second CellIndex to compare.
Returns:
A boolean indicating inequality.
static bool Romulus.CellIndex.operator== ( CellIndex  a,
CellIndex  b 
) [static]

Defines the == operator between two CellIndex objects.

Parameters:
a The first CellIndex to compare.
b The second CellIndex to compare.
Returns:
A boolean indicating equality.

Member Data Documentation

Underlying value.


Property Documentation

int Romulus.CellIndex.X [get, set]

The X coordinate.

int Romulus.CellIndex.Y [get, set]

The Y coordinate.


The documentation for this struct was generated from the following file:
 All Classes Namespaces Functions Variables Enumerations Properties Events