gwnavruntime/queries/fulldebug.h Source File

fulldebug.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 
9 namespace Kaim
10 {
11 
14 struct FullDebug
15 {
16  enum Enum
17  {
18  Inputs = 1 << 0,
19  Traversal = 1 << 1,
20  TraversalPath = 1 << 2,
21  Refiner = 1 << 3,
22  RefinedPath = 1 << 4,
23  DiagonalStripComputer = 1 << 5,
24  DiagonalStrip = 1 << 6,
25  DiagonalStripBubbleArray = 1 << 7,
26  StringPuller = 1 << 8,
27  StringPulledBubbleList = 1 << 9,
28  GateArrayComputer = 1 << 10,
29  GateDefinitionComputer = 1 << 11,
30  GateDefinitionArray = 1 << 12,
31  ChannelSectionWidener = 1 << 13,
32  ChannelBorderSimplifier = 1 << 14,
33  PreAndPostChannelPolylineComputer = 1 << 15,
34  ChannelPath = 1 << 16
35  };
36 
37  struct Names
38  {
39  // Because displaylists are sorted by name
40  static const char* Inputs() { return "(A) Inputs"; }
41  static const char* Traversal() { return "(B) Traversal"; }
42  static const char* TraversalPath() { return "(B.R) [ TraversalPath ]"; }
43  static const char* Refiner() { return "(C) Refiner"; }
44  static const char* RefinedPath() { return "(C.R) [ RefinedPath ]"; }
45  static const char* DiagonalStripComputer() { return "(D) DiagonalStripComputer"; }
46  static const char* DiagonalStrip() { return "(D.R1) [ DiagonalStrip ]"; }
47  static const char* DiagonalStripBubbleArray() { return "(D.R2) [ DiagonalStripBubbleArray ]"; }
48  static const char* StringPuller() { return "(E) StringPuller"; }
49  static const char* StringPulledBubbleList() { return "(E.R) [ StringPulledBubbleList ]"; }
50  static const char* GateArrayComputer() { return "(F) GateArrayComputer"; } // foreach section in between navgraphs
51  static const char* GateDefinitionComputer() { return "(F.1) GateDefinitionComputer"; }
52  static const char* GateDefinitionArray() { return "(F.1.R) [ GateDefinitionArray ]"; }
53  static const char* ChannelSectionWidener() { return "(F.2) ChannelSectionWidener"; }
54  static const char* ChannelBorderSimplifier() { return "(F.2.1) ChannelBorderSimplifier"; }
55  static const char* PrePostPolylineSections() { return "(G) PrePostChannelSections"; }
56  static const char* ChannelPath() { return "(H) [ ChannelPath ]"; } // [ChannelArray] => CreateAggregatedPath => [ChannelPath]
57  };
58 
59  static KyUInt32 AllIntermediatesMask() { return RefinedPath | DiagonalStrip | DiagonalStripBubbleArray | GateDefinitionArray | ChannelPath; }
60 
61  static FullDebug None() { return FullDebug(); }
62  static FullDebug RefinedAndChannelPaths() { return FullDebug(RefinedPath | ChannelPath); }
63  static FullDebug IntermediatePaths() { return FullDebug(TraversalPath | RefinedPath | ChannelPath); }
64  static FullDebug AllIntermediates() { return FullDebug(AllIntermediatesMask()); }
65  static FullDebug All() { return FullDebug(KyUInt32MAXVAL); }
66 
67 public:
68  FullDebug() : m_mask(0) {}
69  explicit FullDebug(KyUInt32 mask) : m_mask(mask) {}
70  void Clear() { m_mask = 0; }
71  void Set(KyUInt32 mask) { m_mask = mask; }
72  bool Has(KyUInt32 e) const { return (m_mask & e) != 0; }
73  bool HasNone() const { return m_mask == 0; }
74  bool HasSome() const { return m_mask != 0; }
75 
76 public:
77  KyUInt32 m_mask;
78 };
79 
80 KY_INLINE void SwapEndianness(Endianness::Target e, FullDebug& self)
81 {
82  SwapEndianness(e, self.m_mask);
83 }
84 
85 }
86 
std::uint32_t KyUInt32
uint32_t
Definition: types.h:29
Target
Enumerates the possible endianness types relative to the current platform.
Definition: endianness.h:27
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17
Computes a StringPulledBubbleList from the provided array of bubbles.
Definition: stringpuller.h:36
Gathers all runtime flags used to debug internal algorithms (mostly PathFinder).
Definition: fulldebug.h:14
#define KyUInt32MAXVAL
KyUInt32 max value
Definition: types.h:68