gwnavruntime/navmesh/celldesc.h Source File

celldesc.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 
8 #pragma once
9 
10 
13 
14 
15 namespace Kaim
16 {
17 
18 class PixelAndCellGrid;
19 
20 
21 class CellDesc
22 {
23  KY_DEFINE_NEW_DELETE_OPERATORS(Stat_Default_Mem)
24 public:
25  void Init(const PixelAndCellGrid& pixelAndCellGrid, const CellPos& cellPos, KyFloat32 rasterPrecision);
26  bool operator==(const CellDesc& other) const;
27 
28 public:
29  CellPos m_cellPos;
30  PixelBox m_exclusivePixelBox;
31  PixelBox m_enlargedPixelBox;
32  CoordBox m_exclusiveCoordBox;
33  CoordBox m_enlargedCoordBox;
34  Box2f m_box2f;
35 };
36 inline void SwapEndianness(Endianness::Target e, CellDesc& self)
37 {
38  SwapEndianness(e, self.m_cellPos);
39  SwapEndianness(e, self.m_exclusivePixelBox);
40  SwapEndianness(e, self.m_enlargedPixelBox);
41  SwapEndianness(e, self.m_exclusiveCoordBox);
42  SwapEndianness(e, self.m_enlargedCoordBox);
43  SwapEndianness(e, self.m_box2f);
44 }
45 
46 
47 }
48 
49 
Vec2i CellPos
A type that represents the position of a cell within a 2D grid.
Definition: navmeshtypes.h:30
Box2i CoordBox
A type that represents a bounding box in the integer 2D grid.
Definition: navmeshtypes.h:21
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:132
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17
float KyFloat32
float
Definition: types.h:32