8 #ifndef Navigation_TriangleFromPosQuery_DisplayListBuilder_H
9 #define Navigation_TriangleFromPosQuery_DisplayListBuilder_H
17 class TriangleFromPosQueryDisplayListBuilder :
public IDisplayListBuilder
20 virtual void DoBuild(ScopedDisplayList* displayList,
char* blob,
KyUInt32 = 0)
22 const TriangleFromPosQueryBlob* queryBlob = (TriangleFromPosQueryBlob*) blob;
25 TriangleFromPosQueryOutputBlob* queryOutputBlob = queryBlob->m_queryOutput.
Ptr();
26 if (queryOutputBlob != NULL)
30 VisualShapeColor shapeColor;
37 displayList->PushPoint(queryBlob->m_inputPos3f, shapeColor);
43 displayList->PushPoint(queryBlob->m_inputPos3f, shapeColor);
44 displayList->PushText(queryBlob->m_inputPos3f + offsetVector, shapeColor.m_lineColor,
"No triangle found!");
50 displayList->PushText(queryBlob->m_inputPos3f + offsetVector, shapeColor.m_lineColor,
"Lack of working memory!");
51 displayList->PushPoint(queryBlob->m_inputPos3f, shapeColor);
57 displayList->PushPoint(queryBlob->m_inputPos3f, shapeColor);
58 Triangle3f triangle = queryOutputBlob->m_resultTrianglePtr.m_triangle;
59 triangle.A.z += triangleZOffset;
60 triangle.B.z += triangleZOffset;
61 triangle.C.z += triangleZOffset;
62 displayList->PushTriangle(triangle, shapeColor);
68 const KyFloat32 spatializationRangeAbovePosition = queryBlob->m_positionSpatializationRange.m_rangeAbovePosition;
69 const KyFloat32 spatializationRangeBelowPosition = queryBlob->m_positionSpatializationRange.m_rangeBelowPosition;
70 const Vec3f rangeTop = queryBlob->m_inputPos3f + Vec3f(0.0f, 0.0f, spatializationRangeAbovePosition);
71 const Vec3f rangeBottom = queryBlob->m_inputPos3f - Vec3f(0.0f, 0.0f, spatializationRangeBelowPosition);
72 displayList->PushLine(rangeBottom, rangeTop, shapeColor.m_lineColor);
Indicates the query has not yet been initialized.
Definition: trianglefromposquery.h:31
TriangleFromPosQueryResult
Enumerates the possible results of a TriangleFromPosQuery.
Definition: trianglefromposquery.h:29
Indicates that insufficient working memory caused the query to stop.
Definition: trianglefromposquery.h:35
Definition: SF_RefCount.h:377
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
static const VisualColor Red
Represents the color with RGBA values (255, 0, 0, 255).
Definition: visualcolor.h:209
static Vec3f UnitZ()
Returns the normalized orientation of the Z axis.
Definition: vec3f.h:218
Definition: gamekitcrowddispersion.h:20
static const VisualColor Cyan
Represents the color with RGBA values ( 0, 255, 255, 255).
Definition: visualcolor.h:116
unsigned int KyUInt32
Type used internally to represent an unsigned 32-bit integer.
Definition: types.h:36
Indicates that the point provided is outside the navigable boundaries of the NavMesh.
Definition: trianglefromposquery.h:34
Indicates that the query was completed successfully; a triangle was found.
Definition: trianglefromposquery.h:37
float KyFloat32
Type used internally to represent a 32-bit floating-point number.
Definition: types.h:43
Indicates the query has not yet been launched.
Definition: trianglefromposquery.h:32