15 inline const char* GetClientAxisName(
const CoordSystem::ClientAxis& clientAxis)
25 default:
return "INVALID_CLIENT_AXIS";
29 inline bool ReadCoordSystemAxis(XmlNode node,
const char* name, CoordSystem::ClientAxis& axis)
32 const char* clientAxischar[6] = {
"CLIENT_X",
"CLIENT_MINUS_X",
"CLIENT_Y",
"CLIENT_MINUS_Y",
"CLIENT_Z",
"CLIENT_MINUS_Z"};
35 if (node.ReadChild(name, str) ==
false)
40 if (TiXml::SameValue(str.c_str(), clientAxischar[i]))
42 axis = clientAxisEnums[i];
56 inline bool Read(XmlNode node, CoordSystem& value)
58 float one_meter = 1.0f;
59 if (node.ReadChild(
"oneMeter", one_meter) ==
false)
62 CoordSystem::ClientAxis axis_x, axis_y, axis_z;
63 if (ReadCoordSystemAxis(node,
"X", axis_x) ==
false) {
return false; }
64 if (ReadCoordSystemAxis(node,
"Y", axis_y) ==
false) {
return false; }
65 if (ReadCoordSystemAxis(node,
"Z", axis_z) ==
false) {
return false; }
67 value.Setup(one_meter, axis_x, axis_y, axis_z);
71 inline void Write(XmlNode node,
const CoordSystem& value)
73 node.WriteChild(
"oneMeter", value.m_oneMeter);
74 node.WriteChild(
"X", GetClientAxisName(value.GetClientAxisForNavigationX()));
75 node.WriteChild(
"Y", GetClientAxisName(value.GetClientAxisForNavigationY()));
76 node.WriteChild(
"Z", GetClientAxisName(value.GetClientAxisForNavigationZ()));
static const ClientAxis CLIENT_Y
Represents the positive direction of the Y axis in the game engine.
Definition: coordsystem.h:127
std::uint32_t KyUInt32
uint32_t
Definition: types.h:29
Represents the positive direction of the client game engine X axis.
Definition: coordsystem.h:32
Represents the positive direction of the client game engine Y axis.
Definition: coordsystem.h:34
static const ClientAxis CLIENT_MINUS_X
Represents the negative direction of the X axis in the game engine.
Definition: coordsystem.h:126
static const ClientAxis CLIENT_Z
Represents the positive direction of the Z axis in the game engine.
Definition: coordsystem.h:129
Represents the positive direction of the client game engine Z axis.
Definition: coordsystem.h:36
Represents the negative direction of the client game engine Z axis.
Definition: coordsystem.h:37
static const ClientAxis CLIENT_X
Represents the positive direction of the X axis in the game engine.
Definition: coordsystem.h:125
static const ClientAxis CLIENT_MINUS_Y
Represents the negative direction of the Y axis in the game engine.
Definition: coordsystem.h:128
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17
static const ClientAxis CLIENT_MINUS_Z
Represents the negative direction of the Z axis in the game engine.
Definition: coordsystem.h:130
Represents the negative direction of the client game engine Y axis.
Definition: coordsystem.h:35
Represents the negative direction of the client game engine X axis.
Definition: coordsystem.h:33