tools/navgenproj/ProjProduceInputMask.h Source File

ProjProduceInputMask.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"
11 
12 namespace Kaim
13 {
14 
15 class ProjProduceInputMask
16 {
17 public:
18  ProjProduceInputMask() { Clear(); }
19 
20  void Clear()
21  {
22  m_tagVolumes = true;
23  m_seedPoints = true;
24  }
25 
26  GenFlags::ProduceInputMask GetInputMask() const
27  {
28  KyUInt32 a = m_tagVolumes ? GenFlags::ProduceInputMask_TagVolumes : 0;
29  KyUInt32 b = m_seedPoints ? GenFlags::ProduceInputMask_SeedPoints : 0;
30  return (GenFlags::ProduceInputMask)(a | b);
31  }
32 
33 public:
34  bool m_tagVolumes;
35  bool m_seedPoints;
36 };
37 
38 inline bool Read(XmlNode node, ProjProduceInputMask& value)
39 {
40  node.ReadChild("tagVolumes", value.m_tagVolumes);
41  node.ReadChild("seedPoints", value.m_seedPoints);
42  return true;
43 }
44 
45 inline void Write(XmlNode node, const ProjProduceInputMask& value)
46 {
47  node.WriteChild("tagVolumes", value.m_tagVolumes);
48  node.WriteChild("seedPoints", value.m_seedPoints);
49 }
50 
51 }
std::uint32_t KyUInt32
uint32_t
Definition: types.h:29
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17