gwnavruntime/dynamicnavmesh/tagvolumeexpander.h Source File

tagvolumeexpander.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 
9 // primary contact: LASI - secondary contact: NOBODY
10 #ifndef Navigation_TagVolumeExpander_H
11 #define Navigation_TagVolumeExpander_H
12 
17 
18 namespace Kaim
19 {
20 
21 class TagVolume;
22 
23 class TagVolumeCylinderExpander
24 {
25  KY_DEFINE_NEW_DELETE_OPERATORS(MemStat_TagVolume)
26 public:
27  TagVolumeCylinderExpander():
28  m_centerOfSymmetrySet(false),
29  m_centerOfSymmetry(Vec2f(KyFloat32MAXVAL, KyFloat32MAXVAL)) {}
30 
31 public:
32  void SetCenterOfSymmetry(const Vec2f& position)
33  {
34  m_centerOfSymmetry = position;
35  m_centerOfSymmetrySet = true;
36  }
37  KyResult ComputeExpandedContour(const TagVolume* volume, KyFloat32 radius, KyArray<Vec2f>& expandedContour) const;
38  bool IsCenterSet() const { return m_centerOfSymmetrySet; }
39 private:
40  bool m_centerOfSymmetrySet;
41  Vec2f m_centerOfSymmetry;
42 };
43 
44 class TagVolumeBoxExpander
45 {
46  KY_DEFINE_NEW_DELETE_OPERATORS(MemStat_TagVolume)
47 
48 public:
49  void Initialize(const Transform& transform, const Box3f& localBox)
50  {
51  m_localBox = localBox;
52  m_transform = transform;
53  }
54  KyResult ComputeExpandedContour(KyFloat32 radius, KyFloat32 mergePointDistance, KyArray<Vec2f>& expandedContour) const;
55 private:
56  Box3f m_localBox;
57  Transform m_transform;
58 };
59 
60 
61 } // Kaim
62 
63 #endif // Navigation_TagVolumeTrigger_H
#define KyFloat32MAXVAL
The maximum value that can be stored in the KyFloat32 variable type.
Definition: types.h:227
KyInt32 KyResult
Defines a type that can be returned by methods or functions in the Gameware Navigation SDK to indicat...
Definition: types.h:254
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