tools/navgenproj/ProjMirrorOptions.h Source File

ProjMirrorOptions.h
Go to the documentation of this file.
1 /*
2 * Copyright 2017 Autodesk, Inc. All rights reserved.
3 * Use of this software is subject to the terms of the Autodesk license agreement and any attachments or Appendices thereto provided at the time of installation or download,
4 * or which otherwise accompanies this software in either electronic or hard copy form, or which is signed by you and accepted by Autodesk.
5 */
6 
7 #pragma once
8 
9 #include "navgenproj/ProjTypes.h"
10 
11 namespace Kaim
12 {
13 
16 {
17 public:
18  ProjMirrorOptions() { Clear(); }
19 
20  void Clear()
21  {
22  m_enabled = false;
23  m_useOneSectorPerMirroredObj = false;
24  m_createCellBox = false;
25  m_extentInMeters = 0.0f;
26  }
27 
28  bool Read_(XmlNode node)
29  {
30  node.ReadChild("useOneSectorPerMirroredObj", m_useOneSectorPerMirroredObj);
31  node.ReadChild("createCellBox", m_createCellBox);
32  node.ReadChild("extentInMeters", m_extentInMeters);
33  if (m_extentInMeters <= 0.f)
34  return false;
35 
36  m_enabled = true;
37  return true;
38  }
39 
40  void Write_(XmlNode node) const
41  {
42  node.WriteChild("useOneSectorPerMirroredObj", m_useOneSectorPerMirroredObj);
43  node.WriteChild("createCellBox", m_createCellBox);
44  node.WriteChild("extentInMeters", m_extentInMeters);
45  }
46 
47 public:
48  bool m_enabled;
49  bool m_useOneSectorPerMirroredObj;
50  bool m_createCellBox;
51  KyFloat32 m_extentInMeters;
52 };
53 
54 inline bool Read(XmlNode node, ProjMirrorOptions& value) { return value.Read_(node); }
55 inline void Write(XmlNode node, const ProjMirrorOptions& value) { value.Write_(node); }
56 
57 }
This class is used to store parameters if a sector must be mirrored cf. LabEngine::MirroredOBJProduce...
Definition: ProjMirrorOptions.h:15
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17
float KyFloat32
float
Definition: types.h:32