gwnavgeneration/navmesh/dynamicnavcellheightfield.h Source File

dynamicnavcellheightfield.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 
11 
12 namespace Kaim
13 {
14 
15 class NavRasterCell;
16 class GeneratorSystem;
17 class DynamicNavRasterCell;
18 class DynamicNavCell;
19 class DynamicPointGraphCell;
20 
21 
22 class NavCellHeightField
23 {
24  KY_DEFINE_NEW_DELETE_OPERATORS(Stat_Default_Mem)
25 
26 public:
27  NavCellHeightField(GeneratorSystem* sys) : m_sys(sys) {}
28  ~NavCellHeightField();
29 
30  KyResult ExtractHeightFieldFromDynamicNavRasterCell(const DynamicNavRasterCell* navRasterCell);
31 
32  // Can return nullptr if navFloorBlob was too small to be sampled and has no heightFieldAssociated
33  NavFloorHeightField* GetNavFloorHeightFieldFromColor(KyUInt32 color)
34  {
35  if (color >= m_heightfieldFloors.GetCount() || m_heightfieldFloors[color] == nullptr)
36  return nullptr;
37 
38  return m_heightfieldFloors[color];
39  }
40 
41 public:
42  GeneratorSystem* m_sys;
43  KyArrayTLS_POD<NavFloorHeightField*> m_heightfieldFloors;
44 };
45 
46 }
47 
std::uint32_t KyUInt32
uint32_t
Definition: types.h:29
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:132
Navigation return code class.
Definition: types.h:108
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17