gwnavruntime/queries/blobs/raycangoquerydisplaylistbuilder.h Source File

raycangoquerydisplaylistbuilder.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 RayCanGoQueryDisplayListBuilder : public QueryDisplayListBuilder<RayCanGoQueryBlob, RayCanGoQueryOutputBlob, RayCanGoQueryDisplayListBuilder>
16 {
17 public:
18  void DoPushQueryShape(Color color)
19  {
20  m_displayList->PushArrow2d5(m_query->m_startPos3f, m_query->m_destPos3f, color);
21  }
22 
23  void Push_BORDER_DETECTED_WITHIN_MARGIN()
24  {
25  PushStartTriangle(Color::Green);
26  PushStartText(Color::Red, "Border detected within margin!");
27  PushQueryShape(Color::Red);
28  }
29 
30 private:
31  virtual void DoBuild(DisplayList* displayList, char* blob)
32  {
33  if (Init(displayList, blob) == false)
34  return;
35 
36  switch ((RayCanGoQueryResult)m_output->m_result)
37  {
38  case RAYCANGO_NOT_INITIALIZED: break;
39  case RAYCANGO_NOT_PROCESSED: Push_NOT_PROCESSED(); break;
40  case RAYCANGO_DONE_START_OUTSIDE: Push_START_OUTSIDE(); break;
41  case RAYCANGO_DONE_START_NAVTAG_FORBIDDEN: Push_START_NAVTAG_FORBIDDEN(); break;
42  case RAYCANGO_DONE_COLLISION_DETECTED: Push_COLLISION_DETECTED(); break;
43  case RAYCANGO_DONE_ARRIVAL_IN_WRONG_FLOOR: Push_ARRIVAL_WRONG_FLOOR(); break;
44  case RAYCANGO_DONE_LACK_OF_WORKING_MEMORY: Push_LACK_OF_WORKING_MEMORY(); break;
45  case RAYCANGO_DONE_UNKNOWN_ERROR: Push_UNKNOWN_ERROR(); break;
46  case RAYCANGO_DONE_SUCCESS: Push_SUCCESS(); break;
47  case RAYCANGO_DONE_BORDER_DETECTED_WITHIN_MARGIN: Push_BORDER_DETECTED_WITHIN_MARGIN(); break; // specific to RayCanGoQuery
48  }
49 
50  PushDynamicOutput();
51  }
52 };
53 
54 }
Indicates that a collision was detected along the straight line between the starting and ending point...
Definition: baseraycangoquery.h:31
Indicates that the query has not yet been launched.
Definition: baseraycangoquery.h:27
Indicates that an unknown error occurred during the query processing.
Definition: baseraycangoquery.h:36
Indicates that none of the above results occurred, which may indicate that the start and end points l...
Definition: baseraycangoquery.h:34
Indicates that the ray can pass in a straight line from the starting point to the ending point withou...
Definition: baseraycangoquery.h:38
Indicates that a border was detected close (less than margin) to the straight line between the starti...
Definition: baseraycangoquery.h:33
Indicates that insufficient memory was available to store crossed triangles or sub-sections, and the query failed as a result.
Definition: baseraycangoquery.h:35
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17
Indicates that a NavMesh triangle could not be found for the starting point.
Definition: baseraycangoquery.h:29
Indicates that a NavMesh triangle has been found for the starting point, but its NavTag is not consid...
Definition: baseraycangoquery.h:30
Indicates that the query has not yet been initialized.
Definition: baseraycangoquery.h:26
RayCanGoQueryResult
Enumerates the possible results of a RayCanGoQuery.
Definition: baseraycangoquery.h:24