gwnavruntime/navmesh/navfloorvisualgeometrybuilder.h Source File

navfloorvisualgeometrybuilder.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: JUBA - secondary contact: NOBODY
10 #ifndef Navigation_NavFloorVisualGeometryBuilder_H
11 #define Navigation_NavFloorVisualGeometryBuilder_H
12 
16 
17 namespace Kaim
18 {
19 
20 class NavFloor;
21 
22 /* This class of VisualRepresentation defines the way a NavFloor should be rendered using triangles. */
23 class NavFloorVisualGeometryBuilder : public IVisualGeometryBuilder
24 {
25 public:
26  NavFloorVisualGeometryBuilder(NavFloor* navFloor, KyInt32 cellSizeInPixel, KyFloat32 integerPrecision);
27 
28  virtual void DoBuild();
29 
30 private:
31  void RenderInvalidLink(const NavHalfEdgeIdx edgeIdx, const NavFloorBlob& currentFloorBlob, const CoordPos64 cellOrigin);
32 
33 public:
34  NavFloor* m_navFloor;
35  KyFloat32 m_integerPrecision;
36  KyInt32 m_cellSizeInPixel;
37  KyInt32 m_cellSizeInCoord;
38 };
39 
40 class NavFloorBlobVisualGeometryBuilder : public IVisualGeometryBuilder
41 {
42 public:
43  NavFloorBlobVisualGeometryBuilder(const NavFloorBlob* navFloorBlob, KyUInt32 floorIdx, KyFloat32 integerPrecision,
44  KyInt32 cellSizeInCoord, const CellPos& cellPos);
45 
46  virtual void DoBuild();
47 
48  void RenderEdge(NavHalfEdgeType edgeType, const CoordPos64& start64, const CoordPos64& end64, const Vec3f& start, const Vec3f& end);
49  void RenderStitchDataBlob(const CoordPos64& cellOrigin);
50 public:
51  const NavFloorBlob* m_navFloorBlob;
52  KyFloat32 m_integerPrecision;
53  KyInt32 m_cellSizeInCoord;
54  KyUInt32 m_floorIdx;
55  CellPos m_cellPos;
56  const NavFloor1To1StitchDataBlob* m_stitchDataBlob;
57 };
58 
59 }
60 
61 #endif // Navigation_NavFloorVisualGeometryBuilder_H
Vec2i CellPos
A type that represents the position of a cell within a 2D grid.
Definition: navmeshtypes.h:33
KyUInt32 NavHalfEdgeIdx
An index that uniquely identifies a single edge of a triangle within the set of edges owned by a NavF...
Definition: navmeshtypes.h:87
int KyInt32
Type used internally to represent a 32-bit integer.
Definition: types.h:35
Vec2LL CoordPos64
A type that represents the position of a point within the 2D integer grid.
Definition: navmeshtypes.h:19
Definition: gamekitcrowddispersion.h:20
NavHalfEdgeType
Enumerates the possible types of boundary that can be represented by a NavHalfEdge.
Definition: navmeshtypes.h:52
unsigned int KyUInt32
Type used internally to represent an unsigned 32-bit integer.
Definition: types.h:36
float KyFloat32
Type used internally to represent a 32-bit floating-point number.
Definition: types.h:43