gwnavgeneration/navraster/navrastertypes.h Source File

navrastertypes.h
Go to the documentation of this file.
1 /*
2 * Copyright 2015 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 
8 // ---------- Primary contact: JUBA - secondary contact: NOBODY
9 #ifndef Navigation_NavRasterTypes_H
10 #define Navigation_NavRasterTypes_H
11 
13 
14 
15 namespace Kaim
16 {
17 
18 typedef KyUInt16 NavRasterConnectionType;
19 static const NavRasterConnectionType NavRasterConnectionType_NO_TAG = 0;
20 static const NavRasterConnectionType NavRasterConnectionType_HOLE = 1;
21 static const NavRasterConnectionType NavRasterConnectionType_WALL = 2;
22 static const NavRasterConnectionType NavRasterConnectionType_STEP = 3;
23 static const NavRasterConnectionType NavRasterConnectionType_CellBorder = 4;
24 
25 typedef KyUInt32 PixelColor;
26 static const PixelColor PixelColor_Unset = KyUInt32MAXVAL;
27 static const PixelColor PixelColor_IrrelevantColor = KyUInt32MAXVAL - 7; //to be compliant with boundary colors
28 
29 typedef KyUInt32 NavRasterFloorIdx;
30 static const NavRasterFloorIdx NavRasterFloorIdx_Invalid = KyUInt32MAXVAL;
31 
32 typedef KyUInt32 NavRasterCardinalDir;
33 static const NavRasterCardinalDir NavRasterCardinalDir_EAST = CardinalDir_EAST /*0*/;
34 static const NavRasterCardinalDir NavRasterCardinalDir_NORTH = CardinalDir_NORTH/*1*/;
35 static const NavRasterCardinalDir NavRasterCardinalDir_WEST = CardinalDir_WEST /*2*/;
36 static const NavRasterCardinalDir NavRasterCardinalDir_SOUTH = CardinalDir_SOUTH/*3*/;
37 static const NavRasterCardinalDir NavRasterCardinalDir_NORTH_EAST = 4;
38 static const NavRasterCardinalDir NavRasterCardinalDir_NORTH_WEST = 5;
39 static const NavRasterCardinalDir NavRasterCardinalDir_SOUTH_WEST = 6;
40 static const NavRasterCardinalDir NavRasterCardinalDir_SOUTH_EAST = 7;
41 KY_INLINE bool IsNavRasterCardinalDirOnDiagonal(const NavRasterCardinalDir dir) { return dir >= 4; }
42 
43 
44 // After the erosion pass, we tag the pixels that are directly adjacent to
45 // certain features.
46 enum NavRasterFeatureMask
47 {
48  UNDEFINED_NAVRASTER_FEATURE = 0,
49  NAVRASTER_HOLE_PIXEL = 1,
50  NAVRASTER_WALL_PIXEL = 2
51  // next = 4/8/16 etc...
52 };
53 
54 }
55 
56 #endif //Navigation_NavRasterTypes_H
57 
static const CardinalDir CardinalDir_NORTH
Identifies North, defined as the positive direction of the Y axis.
Definition: cardinaldir.h:26
static const CardinalDir CardinalDir_SOUTH
Identifies South, defined as the negative direction of the Y axis.
Definition: cardinaldir.h:28
static const CardinalDir CardinalDir_EAST
Identifies East, defined as the positive direction of the X axis.
Definition: cardinaldir.h:25
static const CardinalDir CardinalDir_WEST
Identifies West, defined as the negative direction of the X axis.
Definition: cardinaldir.h:27
Definition: gamekitcrowddispersion.h:20
unsigned short KyUInt16
Type used internally to represent an unsigned 16-bit integer.
Definition: types.h:40
unsigned int KyUInt32
Type used internally to represent an unsigned 32-bit integer.
Definition: types.h:36
#define KyUInt32MAXVAL
The maximum value that can be stored in the KyUInt32 variable type.
Definition: types.h:226