gwnavgeneration/raster/dynamicrastercelldilatator.h Source File

dynamicrastercelldilatator.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 
10 
11 // primary contact: BEHE - secondary contact: GUAL
12 #ifndef GwNavGen_DynamicRasterCellDilatator_H
13 #define GwNavGen_DynamicRasterCellDilatator_H
14 
15 
17 
18 
19 namespace Kaim
20 {
21 
22 class DynamicRasterCell;
23 
24 /*
25 All the interval in the final raster will be dilated vertically by halfHeight up and down,
26 and laterally by radius pixels.
27 radius*m_sys->Partition().m_pixelSize
28 NB1: Must be called BEFORE ReleaseDynamicColumns !
29 NB2: ReleaseDynamicColumns is called before function exit
30 TODO: Realloc dynamic collumn if ReleaseDynamicColumns was called
31 typical usage:
32  DynamicRasterCell copy = original;
33  copy.Dilate(x);
34 */
35 class DynamicRasterCellDilatator
36 {
37  KY_DEFINE_NEW_DELETE_OPERATORS(Stat_Default_Mem)
38 public:
39  DynamicRasterCellDilatator(const DynamicRasterCell* input, PixelCoord radius, KyFloat32 halfHeight) : m_input(input), m_radius(radius), m_halfHeight(halfHeight) {}
40 
41  void Dilate(DynamicRasterCell& dilated) const;
42 
43 protected:
44  const DynamicRasterCell* m_input;
45  PixelCoord m_radius;
46  KyFloat32 m_halfHeight;
47 };
48 
49 
50 } // namespace Kaim
51 
52 
53 #endif
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