gwnavruntime/collision/collisionraycastquerydisplaylistbuilder.h Source File

collisionraycastquerydisplaylistbuilder.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 CollisionRayCastQueryDisplayListBuilder : public QueryDisplayListBuilder<CollisionRayCastQueryBlob, CollisionRayCastQueryOutputBlob, CollisionRayCastQueryDisplayListBuilder>
16 {
17 private:
18  virtual void DoBuild(DisplayList* displayList, char* blob)
19  {
20  if (Init(displayList, blob) == false)
21  return;
22 
23  switch (m_output->GetResult())
24  {
25  case RayHit:
26  displayList->PushArrow(m_query->m_startPos3f, m_query->m_endPos3f, 0.05f, ShapeColor::FillAndLine(Color::Red), 3.0f, 0.1f);
27  break;
28 
29  case RayDidNotHit:
30  displayList->PushArrow(m_query->m_startPos3f, m_query->m_endPos3f, 0.05f, ShapeColor::FillAndLine(Color::Green), 3.0f, 0.1f);
31  break;
32 
33  default:
34  break;
35  }
36  }
37 };
38 
39 }
40 
RayHit.
Definition: collisiontypes.h:17
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17
RayDidNotHit.
Definition: collisiontypes.h:18