Dungeon Architect  17.0.0
SharpNav.CompactSpanReference Struct Reference

A reference to a CompactSpan in a CompactHeightfield. More...

Inheritance diagram for SharpNav.CompactSpanReference:

Public Member Functions

 CompactSpanReference (int x, int y, int i)
 Initializes a new instance of the CompactSpanReference struct. More...
 
bool Equals (CompactSpanReference other)
 Compares this instance to another instance of CompactSpanReference for equality. More...
 
override bool Equals (object obj)
 Compares this instance to another object for equality. More...
 
override int GetHashCode ()
 Gets a hash code unique to this instance. More...
 

Static Public Member Functions

static bool operator== (CompactSpanReference left, CompactSpanReference right)
 Compares two instances of CompactSpanReference for equality. More...
 
static bool operator!= (CompactSpanReference left, CompactSpanReference right)
 Compare two instances of CompactSpanReference for inequality. More...
 

Public Attributes

readonly int X
 The X coordinate of the referenced span. More...
 
readonly int Y
 The Y coordinate of the referenced span. More...
 
readonly int Index
 The index of the referenced span in the spans array. More...
 

Static Public Attributes

static readonly CompactSpanReference Null = new CompactSpanReference(0, 0, -1)
 A "null" reference is one with a negative index. More...
 

Detailed Description

A reference to a CompactSpan in a CompactHeightfield.

Definition at line 13 of file CompactSpanReference.cs.

Constructor & Destructor Documentation

◆ CompactSpanReference()

SharpNav.CompactSpanReference.CompactSpanReference ( int  x,
int  y,
int  i 
)

Initializes a new instance of the CompactSpanReference struct.

Parameters
xThe X coordinate.
yThe Y coordinate.
iThe index of the span in the spans array.

Definition at line 41 of file CompactSpanReference.cs.

Member Function Documentation

◆ Equals() [1/2]

bool SharpNav.CompactSpanReference.Equals ( CompactSpanReference  other)

Compares this instance to another instance of CompactSpanReference for equality.

Parameters
otherAnother instance of CompactSpanReference.
Returns
A value indicating whether this instance and another instance are equal.

Definition at line 93 of file CompactSpanReference.cs.

◆ Equals() [2/2]

override bool SharpNav.CompactSpanReference.Equals ( object  obj)

Compares this instance to another object for equality.

Parameters
objAn object.
Returns
A value indicating whether the object is equal to this instance.

Definition at line 103 of file CompactSpanReference.cs.

◆ GetHashCode()

override int SharpNav.CompactSpanReference.GetHashCode ( )

Gets a hash code unique to this instance.

Returns
A hash code.

Definition at line 115 of file CompactSpanReference.cs.

◆ operator!=()

static bool SharpNav.CompactSpanReference.operator!= ( CompactSpanReference  left,
CompactSpanReference  right 
)
static

Compare two instances of CompactSpanReference for inequality.

If both references have a negative Index, they are considered equal, as both would be considered "null".

Parameters
leftA reference.
rightAnother reference.
Returns
A value indicating whether the two references are not equal.

Definition at line 83 of file CompactSpanReference.cs.

◆ operator==()

static bool SharpNav.CompactSpanReference.operator== ( CompactSpanReference  left,
CompactSpanReference  right 
)
static

Compares two instances of CompactSpanReference for equality.

If both references have a negative Index, they are considered equal, as both would be considered "null".

Parameters
leftA reference.
rightAnother reference.
Returns
A value indicating whether the two references are equal.

Definition at line 57 of file CompactSpanReference.cs.

Member Data Documentation

◆ Index

readonly int SharpNav.CompactSpanReference.Index

The index of the referenced span in the spans array.

Definition at line 33 of file CompactSpanReference.cs.

◆ Null

readonly CompactSpanReference SharpNav.CompactSpanReference.Null = new CompactSpanReference(0, 0, -1)
static

A "null" reference is one with a negative index.

Definition at line 18 of file CompactSpanReference.cs.

◆ X

readonly int SharpNav.CompactSpanReference.X

The X coordinate of the referenced span.

Definition at line 23 of file CompactSpanReference.cs.

◆ Y

readonly int SharpNav.CompactSpanReference.Y

The Y coordinate of the referenced span.

Definition at line 28 of file CompactSpanReference.cs.


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