gwnavruntime/queries/blobs/segmentcangoquerydisplaylistbuilder.h Source File

segmentcangoquerydisplaylistbuilder.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 
11 
12 namespace Kaim
13 {
14 
15 class SegmentCanGoQueryDisplayListBuilder : public QueryDisplayListBuilder<SegmentCanGoQueryBlob, SegmentCanGoQueryOutputBlob, SegmentCanGoQueryDisplayListBuilder>
16 {
17 public:
18  void DoPushQueryShape(Color color)
19  {
20  m_displayList->PushSegmentQuad2d5(m_query->m_startPos3f, m_query->m_destPos3f, m_query->m_radius, color);
21  m_displayList->PushArrow2d5(m_query->m_startPos3f, m_query->m_destPos3f, color);
22  }
23 
24 private:
25  virtual void DoBuild(DisplayList* displayList, char* blob)
26  {
27  if (Init(displayList, blob) == false)
28  return;
29 
30  switch ((SegmentCanGoQueryResult)m_output->m_result)
31  {
32  case SEGMENTCANGO_NOT_INITIALIZED: break;
33  case SEGMENTCANGO_NOT_PROCESSED: Push_NOT_PROCESSED(); break;
34  case SEGMENTCANGO_DONE_START_OUTSIDE: Push_START_OUTSIDE(); break;
35  case SEGMENTCANGO_DONE_START_NAVTAG_FORBIDDEN: Push_START_NAVTAG_FORBIDDEN(); break;
36  case SEGMENTCANGO_DONE_COLLISION_DETECTED: Push_COLLISION_DETECTED(); break;
37  case SEGMENTCANGO_DONE_ARRIVAL_WRONG_FLOOR: Push_ARRIVAL_WRONG_FLOOR(); break;
38  case SEGMENTCANGO_DONE_LACK_OF_WORKING_MEMORY: Push_LACK_OF_WORKING_MEMORY(); break;
39  case SEGMENTCANGO_DONE_UNKNOWN_ERROR: Push_UNKNOWN_ERROR(); break;
40  case SEGMENTCANGO_DONE_SUCCESS: Push_SUCCESS(); break;
41  }
42 
43  PushDynamicOutput();
44  }
45 };
46 
47 }
48 
Indicates that the query has not yet been initialized.
Definition: basesegmentcangoquery.h:22
Indicates that insufficient working memory caused the query to stop.
Definition: basesegmentcangoquery.h:29
Indicates that the query has not yet been launched.
Definition: basesegmentcangoquery.h:23
Indicates that the segment can pass in a straight line from its starting point to the ending point wi...
Definition: basesegmentcangoquery.h:32
SegmentCanGoQueryResult
Enumerates the possible results of a SegmentCanGoQuery.
Definition: basesegmentcangoquery.h:20
Indicates that none of the above results occurred, which may indicate that the start and end points l...
Definition: basesegmentcangoquery.h:28
Indicates that an unknown error occurred during the query processing.
Definition: basesegmentcangoquery.h:30
Indicates that a NavMesh triangle could not be found for the starting point.
Definition: basesegmentcangoquery.h:25
Indicates that a collision was detected between the starting and ending points.
Definition: basesegmentcangoquery.h:27
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17
Indicates that the NavTag at the starting point was forbidden.
Definition: basesegmentcangoquery.h:26