gwnavruntime/math/cardinaldir.h Source File

cardinaldir.h
Go to the documentation of this file.
1 /*
2 * Copyright 2016 Autodesk, Inc. All rights reserved.
3 * Use of this software is subject to the terms of the Autodesk license agreement and any attachments or Appendices thereto provided at the time of installation or download,
4 * or which otherwise accompanies this software in either electronic or hard copy form, or which is signed by you and accepted by Autodesk.
5 */
6 
7 #pragma once
8 
10 
11 namespace Kaim
12 {
13 
16 static const CardinalDir CardinalDir_EAST = 0;
17 static const CardinalDir CardinalDir_NORTH = 1;
18 static const CardinalDir CardinalDir_WEST = 2;
19 static const CardinalDir CardinalDir_SOUTH = 3;
20 static const CardinalDir CardinalDir_INVALID = KyUInt32MAXVAL;
21 
22 inline CardinalDir GetOppositeCardinalDir(CardinalDir dir) { return (dir + 2) & 3; }
23 inline CardinalDir GetNextCardinalDir_CCW(CardinalDir dir) { return (dir + 1) & 3; }
24 inline CardinalDir GetNextCardinalDir_CW(CardinalDir dir) { return (dir + 3) & 3; }
25 
26 }
static const CardinalDir CardinalDir_NORTH
Y positive axis.
Definition: cardinaldir.h:17
std::uint32_t KyUInt32
uint32_t
Definition: types.h:29
KyUInt32 CardinalDir
Defines a type that refers to one of the cardinal points on the compass:
Definition: cardinaldir.h:15
static const CardinalDir CardinalDir_INVALID
Invalid cardinal direction.
Definition: cardinaldir.h:20
static const CardinalDir CardinalDir_SOUTH
Y negative axis.
Definition: cardinaldir.h:19
static const CardinalDir CardinalDir_EAST
X positive axis.
Definition: cardinaldir.h:16
static const CardinalDir CardinalDir_WEST
X negative axis.
Definition: cardinaldir.h:18
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17
#define KyUInt32MAXVAL
KyUInt32 max value
Definition: types.h:68