8 #ifndef Navigation_TriangleFromPosQueryBlob_H
9 #define Navigation_TriangleFromPosQueryBlob_H
19 class TriangleFromPosQueryOutputBlob
23 TriangleFromPosQueryOutputBlob() : m_result(0) {}
28 NavTriangleBlob m_resultTrianglePtr;
33 SwapEndianness(e,
self.m_result);
34 SwapEndianness(e,
self.m_resultTrianglePtr);
35 SwapEndianness(e,
self.m_altitudeOfProjection );
39 class TriangleFromPosQueryOutputBlobBuilder :
public BaseBlobBuilder<TriangleFromPosQueryOutputBlob>
42 TriangleFromPosQueryOutputBlobBuilder(TriangleFromPosQuery* query) { m_query = query; }
43 virtual void DoBuild()
46 BLOB_SET(
m_blob->m_altitudeOfProjection, m_query->GetAltitudeOfProjectionInTriangle());
47 BLOB_BUILD(
m_blob->m_resultTrianglePtr, NavTriangleBlobBuilder(m_query->GetResultTrianglePtr()));
51 TriangleFromPosQuery* m_query;
55 class TriangleFromPosQueryBlob
58 KY_ROOT_BLOB_CLASS(Query, TriangleFromPosQueryBlob, 0)
60 TriangleFromPosQueryBlob() : m_queryInfoId(
KyUInt32MAXVAL), m_databaseIdx(KyUInt32MAXVAL) {}
70 PositionSpatializationRange m_positionSpatializationRange;
72 BlobRef<TriangleFromPosQueryOutputBlob> m_queryOutput;
76 SwapEndianness(e,
self.m_queryInfoId);
77 SwapEndianness(e,
self.m_databaseIdx);
78 SwapEndianness(e,
self.m_inputPos3f);
79 SwapEndianness(e,
self.m_queryType);
80 SwapEndianness(e,
self.m_positionSpatializationRange);
82 SwapEndianness(e,
self.m_queryOutput);
85 class TriangleFromPosQueryBlobBuilder :
public BaseBlobBuilder<TriangleFromPosQueryBlob>
88 TriangleFromPosQueryBlobBuilder(TriangleFromPosQuery* query) { m_query = query; }
89 virtual void DoBuild()
93 if (m_query->m_database !=
KY_NULL)
95 BLOB_SET(
m_blob->m_databaseIdx , m_query->m_database->GetDatabaseIndex());
98 BLOB_SET(
m_blob->m_positionSpatializationRange, m_query->GetPositionSpatializationRange());
100 switch (m_query->GetResult())
113 TriangleFromPosQuery* m_query;
117 #endif // Kaim_TriangleFromPosQueryInputBlob_H
Indicates the query has not yet been initialized.
Definition: trianglefromposquery.h:31
#define BLOB_SET(blob, value)
Use this macro only in implementations of BaseBlobBuilder::DoBuild().
Definition: baseblobbuilder.h:136
TriangleFromPosQueryResult
Enumerates the possible results of a TriangleFromPosQuery.
Definition: trianglefromposquery.h:29
#define BLOB_BUILD(blob, builder)
Use this macro only in implementations of BaseBlobBuilder::DoBuild().
Definition: baseblobbuilder.h:189
#define KY_NULL
Null value.
Definition: types.h:247
Target
Enumerates the possible endianness types relative to the current platform.
Definition: endianness.h:35
TriangleFromPosQueryOutputBlob * m_blob
The blob maintained by this builder. Only modify using the macros listed under DoBuild().
Definition: baseblobbuilder.h:117
Definition: gamekitcrowddispersion.h:20
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:137
unsigned int KyUInt32
Type used internally to represent an unsigned 32-bit integer.
Definition: types.h:36
TriangleFromPosQueryType
Enumerates the possible ways a TriangleFromPosQuery can choose the triangle it retrieves.
Definition: trianglefromposquery.h:41
#define KyUInt32MAXVAL
The maximum value that can be stored in the KyUInt32 variable type.
Definition: types.h:226
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
#define BUILD_REFERENCED_BLOB(blobRef, builder)
Use this macro only in implementations of BaseBlobBuilder::DoBuild().
Definition: baseblobbuilder.h:197