7 #ifndef Navigation_GateArrayComputer_H
8 #define Navigation_GateArrayComputer_H
30 GateArrayComputerResult_ComputingGateDefinitions,
31 GateArrayComputerResult_WidenChannel_FirstGate,
32 GateArrayComputerResult_WidenChannel_TurnGates,
33 GateArrayComputerResult_WidenChannel_LastGate,
35 GateArrayComputerResult_Done_InputError,
36 GateArrayComputerResult_Done_Error,
37 GateArrayComputerResult_Done_GateDefinitionComputerError,
38 GateArrayComputerResult_Done_IntermediateGatesError,
40 GateArrayComputerResult_Done
43 class GateArrayComputer
49 void Initialize(Database* database,
const StringPulledBubbleList& stringPulledBubbleList, Channel* channel);
51 bool IsFinished()
const {
return m_result >= GateArrayComputerResult_Done_InputError; }
56 template<
class TraverseLogic>
57 void Advance(WorkingMemory* workingMemory);
59 template<
class TraverseLogic>
60 KyResult Compute(WorkingMemory* workingMemory);
62 ChannelComputerConfig& GetComputerConfig();
64 KyFloat32 GetComputationDurationMks()
const;
65 void* GetTraverseLogicUserData()
const;
67 Channel* GetChannel() {
return m_channel; }
69 void SetComputerConfig(
const ChannelComputerConfig& computerConfig);
70 void SetTraverseLogicUserData(
void* traverseLogicUserData);
73 void Processing_Initialize();
75 template<
class TraverseLogic>
76 void Processing_ComputingGateDefinitions(WorkingMemory* workingMemory);
78 template<
class TraverseLogic>
79 void Processing_WidenChannel_FirstGate(WorkingMemory* workingMemory);
81 template<
class TraverseLogic>
82 void Processing_WidenChannel_TurnGates(WorkingMemory* workingMemory);
84 template<
class TraverseLogic>
85 void Processing_WidenChannel_LastGate(WorkingMemory* workingMemory);
87 template<
class TLogic>
88 void CreateStartGate(WorkingMemory* workingMemory);
89 template<
class TLogic>
90 void CheckExtremityGateSize(WorkingMemory* workingMemory, Gate& gate);
92 void MovePathPosInsideGates();
94 void TreatCollapsedSections();
96 bool IsGateCollapsed(
const Gate& gate)
const;
97 bool CollapseGateWhenNecessary(
KyUInt32 gateIdx)
const;
99 KyResult ComputeCollapseIntermediaryGate(
const Gate& extremityGate,
const Vec3f collapsingPosition, Gate& intermediaryExtremityGate);
103 void UpdateInternalParametersFromConfig();
105 template<
class TraverseLogic>
106 KyResult WidenChannelNotInTurn(WorkingMemory* workingMemory,
const Vec2f& endGateDirOnLeft);
108 template<
class TraverseLogic>
109 KyResult WidenChannelInTurn(WorkingMemory* workingMemory,
const Vec2f& endGateDirOnLeft);
111 template<
class TLogic>
112 KyResult ComputeCurrentGatePos(WorkingMemory* workingMemory);
114 template<
class TLogic>
115 KyResult TreatNextStringPulledBubble_TransitionToNextBubble(WorkingMemory* workingMemory);
117 template<
class TraverseLogic>
118 KyResult ComputeTurnGate(WorkingMemory* workingMemory,
const Vec2f& gateLeftDirection);
121 Ptr<Database> m_database;
122 ChannelComputerConfig m_computerConfig;
123 void* m_traverseLogicUserData;
130 const StringPulledBubbleList* m_stringPulledBubbleList;
131 Ptr<GateDefinitionArray> m_gateDefinitionArray;
132 Ptr<Channel> m_channel;
135 Vec2f m_prevGateDirOnLeft;
136 Gate m_currentNewGate;
137 Vec3f m_channelCornerPos;
140 GateDefinitionComputer m_gateDefinitionComputer;
141 ChannelSectionWidener m_channelSectionWidener;
144 NavTrianglePtr m_previousGateNavTriangle;
147 bool m_advancedVisualDebuggingEnabled;
156 #endif // Navigation_GateArrayComputer_H
GateArrayComputerResult
Definition: gatearraycomputer.h:25
KyInt32 KyResult
Defines a type that can be returned by methods or functions in the Gameware Navigation SDK to indicat...
Definition: types.h:254
Indicates the query has not yet been launched.
Definition: gatearraycomputer.h:28
Indicates the query has not yet been initialized.
Definition: gatearraycomputer.h:27
Definition: gamekitcrowddispersion.h:20
Indicates that the query has not yet been initialized.
Definition: iquery.h:346
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:137
unsigned int KyUInt32
Type used internally to represent an unsigned 32-bit integer.
Definition: types.h:36
Indicates that the query has not yet been launched.
Definition: iquery.h:347
float KyFloat32
Type used internally to represent a 32-bit floating-point number.
Definition: types.h:43