Scheduled service maintenance on November 22


On Friday, November 22, 2024, between 06:00 CET and 18:00 CET, GIN services will undergo planned maintenance. Extended service interruptions should be expected. We will try to keep downtimes to a minimum, but recommend that users avoid critical tasks, large data uploads, or DOI requests during this time.

We apologize for any inconvenience.

Util.h 765 B

123456789101112131415161718192021222324252627282930313233
  1. // Util.h
  2. #ifndef __UTIL_H__
  3. #define __UTIL_H__
  4. #include "Types.h"
  5. Vec3 operator/(Vec3 v, double scalar);
  6. Vec3 operator+(Vec3 v1, Vec3 v2);
  7. bool operator==(Vec3 v1, Vec3 v2);
  8. double Magnitude(Vec3 v);
  9. Vec3 Normalize(Vec3 v);
  10. Vec3 Perpendicular(Vec3 v);
  11. ///< returns a perpendicular vector (out of infinite) to the provided one
  12. Vec3 CrossProd(Vec3 v1, Vec3 v2);
  13. double DotProd(Vec3 v1, Vec3 v2);
  14. Matrix33 operator*(Matrix33 left, Matrix33 right);
  15. Matrix33 Transpose(Matrix33 in);
  16. Matrix33 Rodrigues(Vec3 v, double angle);
  17. ///< Rodrigues formula for rotation around vector
  18. Matrix33 RotationVecVec(Vec3 v1, Vec3 v2);
  19. ///< Returns the rotation matrix in order to rotate one vector to the other
  20. Vec3 RotatePoint(Matrix33 rot, Vec3 v);
  21. #endif /*__UTIL_H__*/