A RegionId is an identifier with flags marking borders.
More...
|
int | Id [get] |
| Gets the ID of the region without any flags. More...
|
|
RegionFlags | Flags [get] |
| Gets the flags set for this region. More...
|
|
bool | IsNull [get] |
| Gets a value indicating whether the region is the null region (ID == 0). More...
|
|
A RegionId is an identifier with flags marking borders.
Definition at line 35 of file Region.cs.
◆ RegionId() [1/2]
SharpNav.RegionId.RegionId |
( |
int |
id | ) |
|
Initializes a new instance of the RegionId struct without any flags.
- Parameters
-
Definition at line 57 of file Region.cs.
◆ RegionId() [2/2]
SharpNav.RegionId.RegionId |
( |
int |
id, |
|
|
RegionFlags |
flags |
|
) |
| |
Initializes a new instance of the RegionId struct.
- Parameters
-
Definition at line 67 of file Region.cs.
◆ Equals() [1/3]
bool SharpNav.RegionId.Equals |
( |
int |
other | ) |
|
Compares this instance with another an intenger for equality, including flags.
- Parameters
-
- Returns
- A value indicating whether the two instances are equal.
Definition at line 301 of file Region.cs.
◆ Equals() [2/3]
override bool SharpNav.RegionId.Equals |
( |
object |
obj | ) |
|
Compares this instance with an object for equality.
- Parameters
-
- Returns
- A value indicating whether the two instances are equal.
Definition at line 314 of file Region.cs.
◆ Equals() [3/3]
bool SharpNav.RegionId.Equals |
( |
RegionId |
other | ) |
|
Compares this instance with another instance of RegionId for equality, including flags.
- Parameters
-
- Returns
- A value indicating whether the two instances are equal.
Definition at line 283 of file Region.cs.
◆ FromRawBits()
static RegionId SharpNav.RegionId.FromRawBits |
( |
int |
bits | ) |
|
|
static |
Creates a new RegionId from a value that contains both the region ID and the flags.
- Parameters
-
- Returns
- A new instance of the RegionId struct with the specified data.
Definition at line 118 of file Region.cs.
◆ GetHashCode()
override int SharpNav.RegionId.GetHashCode |
( |
| ) |
|
Gets a unique hash code for this instance.
- Returns
- A hash code.
Definition at line 331 of file Region.cs.
◆ HasFlags()
Checks if a region has certain flags.
- Parameters
-
region | The region to check. |
flags | The flags to check. |
- Returns
- A value indicating whether the region has all of the specified flags.
Definition at line 171 of file Region.cs.
◆ operator int()
static SharpNav.RegionId.operator int |
( |
RegionId |
id | ) |
|
|
explicitstatic |
Converts an instance of RegionId to an integer containing both the ID and the flags.
- Parameters
-
- Returns
- An integer.
Definition at line 273 of file Region.cs.
◆ operator!=() [1/2]
static bool SharpNav.RegionId.operator!= |
( |
RegionId |
left, |
|
|
int |
right |
|
) |
| |
|
static |
Compares an instance of RegionId with an integer for inequality.
This checks for both the ID and flags set on the region. If you want to only compare the IDs, use the following code:
int right = ...;
if (left.Id != right)
{
}
RegionId(int id)
Initializes a new instance of the RegionId struct without any flags.
- Parameters
-
left | An instance of RegionId. |
right | An integer. |
- Returns
- A value indicating whether the two values are unequal.
Definition at line 217 of file Region.cs.
◆ operator!=() [2/2]
Compares two instances of RegionId for inequality.
This checks for both the ID and flags set on the regions. If you want to only compare the IDs, use the following code:
if (left.Id != right.Id)
{
}
- Parameters
-
- Returns
- A value indicating whether the two instances are unequal.
Definition at line 263 of file Region.cs.
◆ operator==() [1/2]
static bool SharpNav.RegionId.operator== |
( |
RegionId |
left, |
|
|
int |
right |
|
) |
| |
|
static |
Compares an instance of RegionId with an integer for equality.
This checks for both the ID and flags set on the region. If you want to only compare the IDs, use the following code:
int right = ...;
if (left.Id == right)
{
}
- Parameters
-
left | An instance of RegionId. |
right | An integer. |
- Returns
- A value indicating whether the two values are equal.
Definition at line 194 of file Region.cs.
◆ operator==() [2/2]
Compares two instances of RegionId for equality.
This checks for both the ID and flags set on the regions. If you want to only compare the IDs, use the following code:
if (left.Id == right.Id)
{
}
- Parameters
-
- Returns
- A value indicating whether the two instances are equal.
Definition at line 240 of file Region.cs.
◆ ToString()
override string SharpNav.RegionId.ToString |
( |
| ) |
|
Gets a human-readable version of this instance.
- Returns
- A string representing this instance.
Definition at line 343 of file Region.cs.
◆ WithFlags()
Creates a new RegionId with extra flags.
- Parameters
-
region | The region to add flags to. |
flags | The flags to add. |
- Returns
- A new instance of the RegionId struct with extra flags.
Definition at line 131 of file Region.cs.
◆ WithoutFlags() [1/2]
Creates a new instance of the RegionId class without any flags set.
- Parameters
-
- Returns
- A new instance of the RegionId struct without any flags set.
Definition at line 145 of file Region.cs.
◆ WithoutFlags() [2/2]
Creates a new instance of the RegionId class without certain flags set.
- Parameters
-
region | The region to use. |
flags | The flags to unset. |
- Returns
- A new instnace of the RegionId struct without certain flags set.
Definition at line 156 of file Region.cs.
◆ MaskId
const int SharpNav.RegionId.MaskId = 0x1fffffff |
|
static |
◆ Null
A null region is one with an ID of 0.
Definition at line 40 of file Region.cs.
◆ Flags
Gets the flags set for this region.
Definition at line 94 of file Region.cs.
◆ Id
Gets the ID of the region without any flags.
Definition at line 83 of file Region.cs.
◆ IsNull
bool SharpNav.RegionId.IsNull |
|
get |
Gets a value indicating whether the region is the null region (ID == 0).
Definition at line 105 of file Region.cs.
The documentation for this struct was generated from the following file:
- C:/gamedev/unity/DA20.1X/Assets/CodeRespawn/DungeonArchitect/ThirdParty/SharpNav/Region.cs