WrapperConverter.cpp 788 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #include "imguiWrappedHeader.h"
  2. #include "imguiWrapperTypes.h"
  3. #include "WrapperConverter.h"
  4. void importValue(bool &out, IggBool const &in)
  5. {
  6. out = in != 0;
  7. }
  8. void exportValue(IggBool &out, bool const &in)
  9. {
  10. out = in ? 1 : 0;
  11. }
  12. void importValue(float &out, IggFloat const &in)
  13. {
  14. out = in;
  15. }
  16. void exportValue(IggFloat &out, float const &in)
  17. {
  18. out = in;
  19. }
  20. void importValue(ImVec2 &out, IggVec2 const &in)
  21. {
  22. out.x = in.x;
  23. out.y = in.y;
  24. }
  25. void exportValue(IggVec2 &out, ImVec2 const &in)
  26. {
  27. out.x = in.x;
  28. out.y = in.y;
  29. }
  30. void importValue(ImVec4 &out, IggVec4 const &in)
  31. {
  32. out.x = in.x;
  33. out.y = in.y;
  34. out.z = in.z;
  35. out.w = in.w;
  36. }
  37. void exportValue(IggVec4 &out, ImVec4 const &in)
  38. {
  39. out.x = in.x;
  40. out.y = in.y;
  41. out.z = in.z;
  42. out.w = in.w;
  43. }