gwnavruntime/navmesh/blobs/navvertex.h Source File
Go to the documentation of this file.
9 #ifndef Navigation_NavVertex_H
10 #define Navigation_NavVertex_H
39 bool operator!=(
const NavVertex& v)
const;
40 bool operator< (
const NavVertex& v)
const;
41 bool operator> (
const NavVertex& v)
const;
51 SwapEndianness(e,
self.x);
52 SwapEndianness(e,
self.y);
55 KY_INLINE NavVertex::NavVertex() : x(0xFF), y(0xFF) {}
57 KY_INLINE
KyInt64 NavVertex::GetX64()
const {
return (
KyInt64)GetX32(); }
58 KY_INLINE
KyInt64 NavVertex::GetY64()
const {
return (
KyInt64)GetY32(); }
59 KY_INLINE
KyInt32 NavVertex::GetX32()
const {
return IntCoordSystem::PixelCoordToInt((
KyInt32)x); }
60 KY_INLINE
KyInt32 NavVertex::GetY32()
const {
return IntCoordSystem::PixelCoordToInt((
KyInt32)y); }
61 KY_INLINE
CoordPos NavVertex::GetCoordPos()
const {
return CoordPos(GetX32(), GetY32()); }
64 KY_INLINE
bool NavVertex::operator==(
const NavVertex& v)
const {
return x == v.
x && y == v.
y; }
65 KY_INLINE
bool NavVertex::operator!=(
const NavVertex& v)
const {
return x != v.
x || y != v.
y; }
66 KY_INLINE
bool NavVertex::operator< (
const NavVertex& v)
const {
return (x != v.
x) ? (x < v.
x) : (y < v.
y); }
67 KY_INLINE
bool NavVertex::operator> (
const NavVertex& v)
const {
return !operator<(v) && operator!=(v); }
71 #endif //Navigation_NavVertex_H
KyInt64 GetY64() const
Returns the Y coordinate of the vertex.
Definition: navvertex.h:62
KyUInt8 x
Stores the X coordinate of the vertex. Do not modify.
Definition: navvertex.h:46
KyUInt8 operator[](KyInt32 idx) const
Retrieves the size of the vector around one of its axes.
Definition: navvertex.h:38
int KyInt32
Type used internally to represent a 32-bit integer.
Definition: types.h:35
This class defines a two-dimensional vector whose coordinates are stored using 64-bit integers...
Definition: vec2ll.h:27
Vec2i CoordPos
A type that represents the position of a point within the 2D integer grid.
Definition: navmeshtypes.h:23
Target
Enumerates the possible endianness types relative to the current platform.
Definition: endianness.h:35
CoordPos GetCoordPos() const
Returns the position of the vertex in an integer grid. For internal use.
Definition: navvertex.h:65
KyInt32 GetY32() const
Returns the Y coordinate of the vertex.
Definition: navvertex.h:64
Vec2LL CoordPos64
A type that represents the position of a point within the 2D integer grid.
Definition: navmeshtypes.h:19
unsigned char KyUInt8
Type used internally to represent an unsigned 8-bit integer.
Definition: types.h:41
This class defines a two-dimensional vector whose coordinates are stored using 32-bit integers...
Definition: vec2i.h:26
Definition: gamekitcrowddispersion.h:20
CoordPos64 GetCoordPos64() const
Returns the position of the vertex in an integer grid. For internal use.
Definition: navvertex.h:66
KyUInt8 y
Stores the Y coordinate of the vertex. Do not modify.
Definition: navvertex.h:47
__int64 KyInt64
Type used internally to represent a 64-bit integer.
Definition: types.h:37
Represents a single vertex that forms the corner of at least one NavMesh triangle.
Definition: navvertex.h:22
KyInt32 GetX32() const
Returns the X coordinate of the vertex.
Definition: navvertex.h:63
KyInt64 GetX64() const
Returns the X coordinate of the vertex.
Definition: navvertex.h:61