8 #ifndef Navigation_InsidePosFromOutsidePosQueryBlob_H
9 #define Navigation_InsidePosFromOutsidePosQueryBlob_H
19 class InsidePosFromOutsidePosQueryOutputBlob
23 InsidePosFromOutsidePosQueryOutputBlob() : m_result(0) {}
29 NavTriangleBlob m_insidePosTriangle;
31 inline void SwapEndianness(
Endianness::Target e, InsidePosFromOutsidePosQueryOutputBlob&
self)
33 SwapEndianness(e,
self.m_result);
34 SwapEndianness(e,
self.m_insidePos3f);
35 SwapEndianness(e,
self.m_insidePosTriangle);
39 class InsidePosFromOutsidePosQueryOutputBlobBuilder :
public BaseBlobBuilder<InsidePosFromOutsidePosQueryOutputBlob>
42 InsidePosFromOutsidePosQueryOutputBlobBuilder(BaseInsidePosFromOutsidePosQuery* query) { m_query = query; }
43 virtual void DoBuild()
47 BLOB_BUILD(
m_blob->m_insidePosTriangle, NavTriangleBlobBuilder(m_query->GetInsidePosTrianglePtr()));
51 BaseInsidePosFromOutsidePosQuery* m_query;
55 class InsidePosFromOutsidePosQueryBlob
58 KY_ROOT_BLOB_CLASS(Query, InsidePosFromOutsidePosQueryBlob, 0)
60 InsidePosFromOutsidePosQueryBlob() : m_queryInfoId(
KyUInt32MAXVAL), m_databaseIdx(KyUInt32MAXVAL) {}
67 Vec2f m_castDirection;
70 PositionSpatializationRange m_positionSpatializationRange;
72 BlobRef<InsidePosFromOutsidePosQueryOutputBlob> m_queryOutput;
74 inline void SwapEndianness(
Endianness::Target e, InsidePosFromOutsidePosQueryBlob&
self)
76 SwapEndianness(e,
self.m_queryInfoId );
77 SwapEndianness(e,
self.m_databaseIdx );
78 SwapEndianness(e,
self.m_inputPos3f );
79 SwapEndianness(e,
self.m_castDirection );
80 SwapEndianness(e,
self.m_distFromObstacle );
81 SwapEndianness(e,
self.m_horizontalTolerance);
82 SwapEndianness(e,
self.m_positionSpatializationRange);
84 SwapEndianness(e,
self.m_queryOutput);
87 class InsidePosFromOutsidePosQueryBlobBuilder :
public BaseBlobBuilder<InsidePosFromOutsidePosQueryBlob>
90 InsidePosFromOutsidePosQueryBlobBuilder(BaseInsidePosFromOutsidePosQuery* query) { m_query = query; }
91 virtual void DoBuild()
95 if (m_query->m_database !=
KY_NULL)
97 BLOB_SET(
m_blob->m_databaseIdx , m_query->m_database->GetDatabaseIndex());
100 BLOB_SET(
m_blob->m_distFromObstacle , m_query->GetDistFromObstacle());
101 BLOB_SET(
m_blob->m_horizontalTolerance , m_query->GetHorizontalTolerance());
102 BLOB_SET(
m_blob->m_positionSpatializationRange, m_query->GetPositionSpatializationRange());
104 switch (m_query->GetResult())
117 BaseInsidePosFromOutsidePosQuery* m_query;
121 #endif // Kaim_InsidePosFromOutsidePosQueryInputBlob_H
InsidePosFromOutsidePosQueryResult
Enumerates the possible results of an InsidePosFromOutsidePosQuery.
Definition: baseinsideposfromoutsideposquery.h:26
#define BLOB_SET(blob, value)
Use this macro only in implementations of BaseBlobBuilder::DoBuild().
Definition: baseblobbuilder.h:136
Indicates the query has not yet been initialized.
Definition: baseinsideposfromoutsideposquery.h:28
#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
InsidePosFromOutsidePosQueryOutputBlob * 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
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
#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
#define BUILD_REFERENCED_BLOB(blobRef, builder)
Use this macro only in implementations of BaseBlobBuilder::DoBuild().
Definition: baseblobbuilder.h:197