8 #ifndef Navigation_InsidePosFromOutsidePosQuery_DisplayListBuilder_H
9 #define Navigation_InsidePosFromOutsidePosQuery_DisplayListBuilder_H
19 class InsidePosFromOutsidePosQueryDisplayListBuilder :
public IDisplayListBuilder
22 void DrawSearchBox(
const InsidePosFromOutsidePosQueryBlob* queryBlob,
const VisualColor& color, ScopedDisplayList* displayList)
24 Vec3f boxMax(queryBlob->m_inputPos3f);
25 Vec3f boxMin(queryBlob->m_inputPos3f);
26 boxMin.x -= queryBlob->m_horizontalTolerance;
27 boxMin.y -= queryBlob->m_horizontalTolerance;
28 boxMin.z -= queryBlob->m_positionSpatializationRange.m_rangeBelowPosition;
30 boxMax.x += queryBlob->m_horizontalTolerance;
31 boxMax.y += queryBlob->m_horizontalTolerance;
32 boxMax.z += queryBlob->m_positionSpatializationRange.m_rangeAbovePosition;
34 VisualShapeColor shapeColor;
35 shapeColor.m_lineColor = color;
36 displayList->PushBox(Box3f(boxMin, boxMax), shapeColor);
39 virtual void DoBuild(ScopedDisplayList* displayList,
char* blob,
KyUInt32 = 0)
41 const InsidePosFromOutsidePosQueryBlob* queryBlob = (InsidePosFromOutsidePosQueryBlob*) blob;
44 InsidePosFromOutsidePosQueryOutputBlob* queryOutputBlob = queryBlob->m_queryOutput.Ptr();
45 if (queryOutputBlob != NULL)
51 VisualShapeColor shapeColor;
60 displayList->PushPoint(queryBlob->m_inputPos3f, pointRadius, shapeColor);
69 displayList->PushPoint(queryBlob->m_inputPos3f, pointRadius, shapeColor);
71 displayList->PushLine(queryBlob->m_inputPos3f, queryBlob->m_inputPos3f + Vec3f(queryBlob->m_castDirection * 2.f * queryBlob->m_horizontalTolerance), shapeColor.m_lineColor);
77 displayList->PushText(queryOutputBlob->m_insidePos3f + offsetVector,
VisualColor::Lime,
"Inside pos");
80 displayList->PushDisk(queryOutputBlob->m_insidePos3f, queryBlob->m_distFromObstacle, subdivisionCount, shapeColor);
83 displayList->PushPoint(queryBlob->m_inputPos3f, pointRadius, shapeColor);
86 displayList->PushArrow(queryBlob->m_inputPos3f, queryOutputBlob->m_insidePos3f, 0.001f, shapeColor);
89 displayList->PushLine(queryBlob->m_inputPos3f, queryBlob->m_inputPos3f + Vec3f(queryBlob->m_castDirection * 2.f * queryBlob->m_horizontalTolerance),
VisualColor::LightGreen);
InsidePosFromOutsidePosQueryResult
Enumerates the possible results of an InsidePosFromOutsidePosQuery.
Definition: baseinsideposfromoutsideposquery.h:26
Indicates that the query was completed successfully, and a valid position on the NavMesh was found wi...
Definition: baseinsideposfromoutsideposquery.h:34
#define KyFloat32MAXVAL
The maximum value that can be stored in the KyFloat32 variable type.
Definition: types.h:227
Indicates the query has not yet been initialized.
Definition: baseinsideposfromoutsideposquery.h:28
static const VisualColor Lime
Represents the color with RGBA values ( 0, 255, 0, 255).
Definition: visualcolor.h:172
static const VisualColor Orange
Represents the color with RGBA values (255, 165, 0, 255).
Definition: visualcolor.h:195
Indicates that insufficient working memory caused the query to stop.
Definition: baseinsideposfromoutsideposquery.h:31
static const VisualColor Red
Represents the color with RGBA values (255, 0, 0, 255).
Definition: visualcolor.h:209
static const VisualColor LightGreen
Represents the color with RGBA values (144, 238, 144, 255).
Definition: visualcolor.h:164
static Vec3f UnitZ()
Returns the normalized orientation of the Z axis.
Definition: vec3f.h:218
Definition: gamekitcrowddispersion.h:20
static const VisualColor White
Represents the color with RGBA values (255, 255, 255, 255).
Definition: visualcolor.h:234
Indicates the query has not yet been launched.
Definition: baseinsideposfromoutsideposquery.h:29
unsigned int KyUInt32
Type used internally to represent an unsigned 32-bit integer.
Definition: types.h:36
Indicates that a valid position was not found within the query's bounding box.
Definition: baseinsideposfromoutsideposquery.h:33
float KyFloat32
Type used internally to represent a 32-bit floating-point number.
Definition: types.h:43