#ifndef VolViz_Geometry_h
#define VolViz_Geometry_h

#include "Types.h"

namespace VolViz {

enum MoveMask : uint8_t {
  None = 0x00,
  X = 0x01,
  Y = 0x02,
  Z = 0x04,
  All = 0x07
};

struct GeometryDescriptor {
  bool movable{true};
  Color color{Colors::White()};
};

struct AxisAlignedPlaneDescriptor : public GeometryDescriptor {
  Length intercept{0 * meter};
  Axis axis{Axis::X};
};

} // namespace VolViz

#endif // VolViz_Geometry_h

#ifndef VolViz_Geometry_h
#define VolViz_Geometry_h

#include "Types.h"

namespace VolViz {

enum MoveMask : uint8_t {
  None = 0x00,
  X = 0x01,
  Y = 0x02,
  Z = 0x04,
  All = 0x07
};

inline Vector3f maskToUnitVector(MoveMask mask) noexcept {
  Vector3f v = Vector3f::Zero();
  auto maskRep = static_cast<uint8_t>(mask);

  Expects(maskRep <= 0x07);

  int idx{0};
  while (maskRep != 0) {
    if (maskRep & 0x01) v(idx) = 1.f;
    maskRep >>= 1;
    ++idx;
  }

  return v;
}

struct GeometryDescriptor {
  bool movable{true};
  Color color{Colors::White()};
};

struct AxisAlignedPlaneDescriptor : public GeometryDescriptor {
  Length intercept{0 * meter};
  Axis axis{Axis::X};
};

} // namespace VolViz

#endif // VolViz_Geometry_h

Add function to convert MoveMak to mask vector
Add function to convert MoveMak to mask vector
