gwnavruntime/navgraph/navgraphvisualgeometrybuilder.h Source File

navgraphvisualgeometrybuilder.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_NavGraphVisualRepresentation_H
11 #define Navigation_NavGraphVisualRepresentation_H
12 
13 
15 
16 namespace Kaim
17 {
18 
19 class NavGraph;
20 class NavGraphBlob;
21 class VisualShapeColor;
22 class Vec3f;
23 
24 /* This class of VisualRepresentation defines the way the data in a NavGraph
25  should be rendered using triangles. */
26 class NavGraphVisualGeometryBuilder : public IVisualGeometryBuilder
27 {
28 public:
29  NavGraphVisualGeometryBuilder(NavGraph* navGraph) : m_navGraph(navGraph) {}
30 
31  virtual void DoBuild();
32 public:
33  NavGraph* m_navGraph;
34 };
35 
36 /* This class of VisualRepresentation defines the way the data in a NavGraphBlob
37  should be rendered using triangles. */
38 class NavGraphBlobVisualGeometryBuilder : public IVisualGeometryBuilder
39 {
40 
41 public:
42  NavGraphBlobVisualGeometryBuilder(const NavGraphBlob* navGraphBlob) : m_navGraphBlob(navGraphBlob) {}
43 
44  virtual void DoBuild();
45 private:
46  void DrawVertex(const Vec3f& pos, KyFloat32 halfWidth, const VisualShapeColor& color);
47  void DrawEdge(bool bidirectional, const Vec3f& edgeStart, const Vec3f& edgeEnd);
48 public:
49  const NavGraphBlob* m_navGraphBlob;
50 };
51 
52 
53 }
54 
55 #endif
56 
Definition: gamekitcrowddispersion.h:20
float KyFloat32
Type used internally to represent a 32-bit floating-point number.
Definition: types.h:43