2
0

gtx_matrix_query.cpp 944 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #include <glm/gtx/matrix_query.hpp>
  2. int test_isNull()
  3. {
  4. int Error(0);
  5. bool TestA = glm::isNull(glm::mat4(0), 0.00001f);
  6. Error += TestA ? 0 : 1;
  7. return Error;
  8. }
  9. int test_isIdentity()
  10. {
  11. int Error(0);
  12. {
  13. bool TestA = glm::isIdentity(glm::mat2(1), 0.00001f);
  14. Error += TestA ? 0 : 1;
  15. }
  16. {
  17. bool TestA = glm::isIdentity(glm::mat3(1), 0.00001f);
  18. Error += TestA ? 0 : 1;
  19. }
  20. {
  21. bool TestA = glm::isIdentity(glm::mat4(1), 0.00001f);
  22. Error += TestA ? 0 : 1;
  23. }
  24. return Error;
  25. }
  26. int test_isNormalized()
  27. {
  28. int Error(0);
  29. bool TestA = glm::isNormalized(glm::mat4(1), 0.00001f);
  30. Error += TestA ? 0 : 1;
  31. return Error;
  32. }
  33. int test_isOrthogonal()
  34. {
  35. int Error(0);
  36. bool TestA = glm::isOrthogonal(glm::mat4(1), 0.00001f);
  37. Error += TestA ? 0 : 1;
  38. return Error;
  39. }
  40. int main()
  41. {
  42. int Error(0);
  43. Error += test_isNull();
  44. Error += test_isIdentity();
  45. Error += test_isNormalized();
  46. Error += test_isOrthogonal();
  47. return Error;
  48. }