gwnavgeneration/navmesh/dynamicnavcellheightfield.h Source File

dynamicnavcellheightfield.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: LASI - secondary contact: NONE
9 #ifndef GwNavGen_DynamicHeightFieldCell_H
10 #define GwNavGen_DynamicHeightFieldCell_H
11 
14 
15 namespace Kaim
16 {
17 
18 class NavRasterCell;
19 class GeneratorSystem;
20 class DynamicNavRasterCell;
21 class DynamicNavCell;
22 
23 class DynamicPointGraphCell;
24 
25 // -----------------------------------
26 // ----- DynamicHeightFieldCell -----
27 // -----------------------------------
28 class DynamicNavCellHeightField
29 {
30  KY_DEFINE_NEW_DELETE_OPERATORS(Stat_Default_Mem)
31 
32 public:
33  DynamicNavCellHeightField(GeneratorSystem* sys) : m_sys(sys) {}
34  ~DynamicNavCellHeightField();
35 
36  KyResult ExtractHeightFieldFromDynamicNavRasterCell(const DynamicNavRasterCell* navRasterCell, KyUInt32 stride);
37  // Can return KY_NULL if navFloorBlob was too small to be sampled and has no heightFieldAssociated
38  DynamicNavFloorHeightField* GetNavFloorHeightFieldFromColor(KyUInt32 color)
39  {
40  if (color >= m_heightfieldFloors.GetCount() || m_heightfieldFloors[color] == KY_NULL)
41  {
42  return KY_NULL;
43  }
44  return m_heightfieldFloors[color];
45  }
46 
47 public:
48 
49  GeneratorSystem* m_sys;
50  KyArrayTLS_POD<DynamicNavFloorHeightField*> m_heightfieldFloors;
51 };
52 
53 }
54 
55 
56 #endif //GwNavGen_DynamicNavFloor_H
57 
KyInt32 KyResult
Defines a type that can be returned by methods or functions in the Gameware Navigation SDK to indicat...
Definition: types.h:254
#define KY_NULL
Null value.
Definition: types.h:247
Definition: gamekitcrowddispersion.h:20
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:137
unsigned int KyUInt32
Type used internally to represent an unsigned 32-bit integer.
Definition: types.h:36