gwnavruntime/dynamicnavmesh/tagvolumeexpander.h Source File

tagvolumeexpander.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 
13 
14 namespace Kaim
15 {
16 
17 class TagVolume;
18 
19 class TagVolumeCylinderExpander
20 {
21  KY_DEFINE_NEW_DELETE_OPERATORS(MemStat_TagVolume)
22 public:
23  TagVolumeCylinderExpander():
24  m_centerOfSymmetrySet(false),
25  m_centerOfSymmetry(Vec2f(KyFloat32MAXVAL, KyFloat32MAXVAL)) {}
26 
27 public:
28  void SetCenterOfSymmetry(const Vec2f& position)
29  {
30  m_centerOfSymmetry = position;
31  m_centerOfSymmetrySet = true;
32  }
33 
34  void ComputeExpandedContour(const TagVolume* volume, KyFloat32 radius, KyArray<Vec2f>& expandedContour) const;
35 
36 private:
37  bool m_centerOfSymmetrySet;
38  Vec2f m_centerOfSymmetry;
39 };
40 
41 class TagVolumeBoxExpander
42 {
43  KY_DEFINE_NEW_DELETE_OPERATORS(MemStat_TagVolume)
44 
45 public:
46  void Initialize(const Transform& transform, const Box3f& localBox)
47  {
48  m_localBox = localBox;
49  m_transform = transform;
50  }
51 
52  void ComputeExpandedContour(KyFloat32 radius, KyFloat32 mergePointDistance, KyArray<Vec2f>& expandedContour) const;
53 
54 private:
55  Box3f m_localBox;
56  Transform m_transform;
57 };
58 
59 
60 } // Kaim
61 
#define KyFloat32MAXVAL
KyFloat32 max value
Definition: types.h:71
#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