gwnavruntime/database/positionspatializationrange.h Source File

positionspatializationrange.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: LAPA - secondary contact: NOBODY
9 #ifndef Navigation_PositionSpatializationRange_H
10 #define Navigation_PositionSpatializationRange_H
11 
14 
15 
16 namespace Kaim
17 {
18 
19 class PositionSpatializationRange
20 {
21  KY_DEFINE_NEW_DELETE_OPERATORS(MemStat_WorldFwk)
22 
23 public:
24  PositionSpatializationRange()
25  : m_rangeAbovePosition(0.0f)
26  , m_rangeBelowPosition(0.0f)
27  {}
28 
29  PositionSpatializationRange(KyFloat32 rangeAbovePosition, KyFloat32 rangeBelowPosition)
30  : m_rangeAbovePosition(rangeAbovePosition)
31  , m_rangeBelowPosition(rangeBelowPosition)
32  {}
33 
34  KyFloat32 m_rangeAbovePosition; // Range of altitude above positions that will be searched for triangles.
35  KyFloat32 m_rangeBelowPosition; // Range of altitude below positions that will be searched for triangles.
36 };
37 
38 KY_INLINE void SwapEndianness(Endianness::Target e, PositionSpatializationRange& self)
39 {
40  SwapEndianness(e, self.m_rangeAbovePosition);
41  SwapEndianness(e, self.m_rangeAbovePosition);
42 }
43 
44 
45 class DatabaseGenMetrics;
46 
47 class DatabasePositionSpatializationRange
48 {
49  KY_DEFINE_NEW_DELETE_OPERATORS(MemStat_WorldFwk)
50  KY_CLASS_WITHOUT_COPY(DatabasePositionSpatializationRange)
51 
52 public:
53  DatabasePositionSpatializationRange()
54  : m_genMetrics(KY_NULL)
55  , m_customized(false)
56  {}
57 
58  void InitFromGenerationMetrics();
59  KyResult SetSpatializationRange(KyFloat32 abovePosition, KyFloat32 belowPosition);
60 
61  const PositionSpatializationRange& GetPositionSpatializationRange() const { return m_positionSpatializationRange; }
62  bool IsCustomized() const { return m_customized; }
63 
64 private:
65  friend class Database;
66  PositionSpatializationRange m_positionSpatializationRange;
67  DatabaseGenMetrics* m_genMetrics;
68  bool m_customized;
69 };
70 
71 } // namespace Kaim
72 
73 #endif // Navigation_PositionSpatializationRange_H
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
#define KY_CLASS_WITHOUT_COPY(ClassName)
Define to forbid copy constructor and copy assignment.
Definition: types.h:387
Target
Enumerates the possible endianness types relative to the current platform.
Definition: endianness.h:35
Definition: gamekitcrowddispersion.h:20
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:137
float KyFloat32
Type used internally to represent a 32-bit floating-point number.
Definition: types.h:43