27 class DisplayListManager;
54 : m_displayListManager(
nullptr)
60 String m_visualDebugPrefix;
62 StringPulledBubbleListDisplayConfig m_rawBubbleListDisplayConfig;
63 StringPulledBubbleListDisplayConfig m_adjustedBubbleListDisplayConfig;
64 StringPulledBubbleListDisplayConfig m_simplifiedBubbleListDisplayConfig;
65 CircleArcSplineSectionDisplayConfig m_circleArcSplineSectionDisplayConfig;
68 Ptr<SplineInputBlobDumpConfig> m_inputBlobDumpConfig;
77 StringPulledEdge m_edge;
82 class SplineInputBlobDumpConfig;
83 class SplineInputBlobDumper;
92 void Initialize(
const SplineComputationConfig& splineConfig,
93 const Vec3f& startPosition,
const ChannelSectionPtr& startSection,
94 const Vec3f& endPosition,
const ChannelSectionPtr& endSection);
97 void ClearInternals();
99 void SetStartConstraint(
const Vec2f& constraint) { m_startConstraint = constraint; }
100 void SetEndConstraint(
const Vec2f& constraint) { m_endConstraint = constraint; }
104 KyUInt32 GetOutputCount()
const {
return m_profileOutputs.GetCount(); }
109 enum NextChannelTurnRangeSearchResult
111 NextChannelTurnFound,
115 enum ChangeTurnBubbleResult
117 TurnBubbleChangeRejected,
118 TurnBubbleChangeAccepted,
119 TurnBubbleChangeIgnored
122 enum NeighborTurnValidationResult
125 ValidNeighborTurn_Small,
126 InvalidNeighborTurn_ContinueSearch,
127 InvalidNeighborTurn_StopSearch
130 enum NeighborTurnArcValidationMode
132 UseIsInTurnRangeForSameSideArcsAndCanGoForOppositeOnes,
143 KyResult ComputeStringPulledBubbleList(
const BubbleArray& bubbleArray, StringPulledBubbleList& stringPulledBubbleList);
172 void EnsureBubbleArrayIsStringPullable(
BubbleArray& bubbleArray);
174 void AdjustBubbleRadiusRelativelyToNearbyBubble(
const Bubble* nearbyBubble,
Bubble& bubble);
175 void EnsureBubbleArrayIsStringPullable_ForwardPass(
BubbleArray& bubbleArray,
const KyUInt32 firstCornerBubbleIdx,
const KyUInt32 lastCornerBubbleIdx);
176 void EnsureBubbleArrayIsStringPullable_BackwardPass(
BubbleArray& bubbleArray,
const KyUInt32 firstCornerBubbleIdx,
const KyUInt32 lastCornerBubbleIdx);
204 KyResult TryFirstTurnWithRelaxedStartConstraint(
205 Bubble& newStartBubble,
KyUInt32& newStartBubbleRadiusIndexInProfile,
const CircleArcSplineTurn& curTurn,
209 KyResult TryLastTurnCandidateWithRelaxedEndConstraint(
210 Bubble& newEndBubble,
KyUInt32& newEndBubbleRadiusIndexInProfile,
const CircleArcSplineTurn& curTurn,
214 NeighborTurnValidationResult ValidatePrevTurnCandidate(
const CircleArcSplineTurn& curTurn,
const Bubble& turnBubbleCdt,
const CircleArcSplineTurn& prevTurnCdtTurn,
216 KyFloat32& skippedTurnAngleRadSum, NeighborTurnArcValidationMode neighborTurnArcValidationMode);
218 NeighborTurnValidationResult ValidateNextTurnCandidate(
const CircleArcSplineTurn& curTurn,
const Bubble& turnBubbleCdt,
const CircleArcSplineTurn& nextTurnCdtTurn,
220 KyFloat32& skippedTurnAngleRadSum, NeighborTurnArcValidationMode neighborTurnArcValidationMode);
222 bool DoesSegmentRespectDistanceToChannelBorder(
const Channel* channel,
225 bool DoesCircleArcRespectDistanceToChannelBorder(
const Channel* channel,
const Bubble& circleArcBubble,
234 const TurnList& GetTurnList()
const {
return m_turnList; }
239 enum VerboseMode {Verbose, Silent};
246 void InitializeVisualDebugColor();
247 void InitializeDisplayList(
DisplayList& displayList,
const char* groupName,
const char* listName)
const;
248 void RenderSplineComputationInputs()
const;
249 void RenderBubbleData(
const CircleArcSplineTurn& turn,
const char* groupName)
const;
250 void RenderBubbleArray(
const BubbleArray& bubbleArray)
const;
251 void RenderTurnList(
const TurnList& turnList,
const char* listBaseName,
const StringPulledBubbleListDisplayConfig& displayConfig)
const;
259 #ifdef DBG_CircleArcSplineComputer_PrintStatsOnSmallArcs
260 static void PrintSmallElementsStatistics();
261 #endif // DBG_CircleArcSplineComputer_PrintStatsOnSmallArcs
266 const SplineComputationConfig* m_splineConfig;
267 ChannelSectionPtr m_startSection;
268 ChannelSectionPtr m_endSection;
269 Vec3f m_startPosition;
271 Vec2f m_startConstraint;
272 Vec2f m_endConstraint;
282 KyFloat32 m_maxAngleCosToleranceOnStartAndEndConstraints;
286 TurnList::NodePool m_turnPool;
292 bool m_checkStartConstraintMaxAngle;
293 Vec2f m_startConstraintCWLimit;
294 Vec2f m_startConstraintCCWLimit;
296 bool m_checkEndConstraintMaxAngle;
297 Vec2f m_endConstraintCWLimit;
298 Vec2f m_endConstraintCCWLimit;
304 KyUInt32 m_debug_ChangeTurnBubble_VisualDebugListIdx;
305 String m_debug_RadiusProfileLabel;
308 bool m_isInComputingSpline;
313 bool m_debug_CheckSplineValidity;
317 KY_INLINE
KyFloat32 CircleArcSplineComputer::GetReducedChannelWidth(
KyFloat32 channelWidth)
const
319 const KyFloat32 reducedChannelWidth = (channelWidth > 2.0f * m_margin) ? (channelWidth - m_margin) : 0.5f * channelWidth;
320 return reducedChannelWidth;
Class used to configure all VisualDebug components for CircleArcSpline computation.
Definition: circlearcsplinecomputer.h:50
Game side: Manages all DisplayListData, send them to the NavigationLab.
Definition: displaylist.h:375
Class aggregating a CircleArcSpline and the corresponding computation result.
Definition: circlearcsplinecomputer.h:33
std::uint32_t KyUInt32
uint32_t
Definition: types.h:29
RadiusProfile is an array of preferred radii.
Definition: radiusprofile.h:26
This class encapsulate an array of Bubbles.
Definition: bubblearray.h:22
General purpose array for movable objects that require explicit construction/destruction.
Definition: kyarray.h:162
RotationDirection
Defines the 4 possible cases of possibly constrained rotation in the horizontal plane for a given ele...
Definition: rotation.h:15
The class representing a spline compounded of oriented circle arcs and straight line segments...
Definition: circlearcspline.h:27
The spline has not yet been computed.
Definition: circlearcsplinecomputationresult.h:17
This class represents a circle with potential rotation limitation.
Definition: bubble.h:31
2d vector using KyFloat32.
Definition: vec2f.h:18
DisplayList is used to push text, lines or shapes for rendering in the NavigationLab e...
Definition: displaylist.h:128
Navigation return code class.
Definition: types.h:108
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17
Class used to compute a CircleArcSpline in a Channel.
Definition: circlearcsplinecomputer.h:86
CircleArcSplineComputationResult
Enumerates the CircleArcSpline computation results.
Definition: circlearcsplinecomputationresult.h:15
Channel enrich Path with clearance information on each side of the Path.
Definition: channel.h:169
Iterator on SharedPoolList nodes (SPL stands for SharedPoolList).
Definition: sharedpoollist.h:41
#define KyUInt32MAXVAL
KyUInt32 max value
Definition: types.h:68
float KyFloat32
float
Definition: types.h:32
3d vector using 32bits floating points.
Definition: vec3f.h:16