local_transform.h - Engine C API Reference

local_transform.h
  1. #pragma once
  2. #include "types.h"
  3. namespace stingray_plugin_foundation {
  4. // ----------------------------------------------------------------------
  5. // Matrix3x3
  6. // ----------------------------------------------------------------------
  7. // Constructors
  8. inline Matrix3x3 matrix3x3_identity();
  9. // Operations
  10. inline void set_to_identity(Matrix3x3 &tm);
  11. inline Matrix3x3 operator*(const Matrix3x3 &a, const Matrix3x3 &b);
  12. // Conversions
  13. inline Matrix3x3 matrix3x3(const Quaternion &q);
  14. inline Matrix3x3 matrix3x3(const Matrix4x4 &m);
  15. // ----------------------------------------------------------------------
  16. // LocalTransform
  17. // ----------------------------------------------------------------------
  18. // Constructors
  19. inline LocalTransform local_transform(const Matrix3x3 &rot, const Vector3 &pos);
  20. inline LocalTransform local_transform(const Matrix3x3 &rot, const Vector3 &pos, const Vector3 &scale);
  21. inline LocalTransform local_transform_identity();
  22. // Operations
  23. inline void set_to_identity(LocalTransform &tm);
  24. inline LocalTransform operator*(const LocalTransform &a, const LocalTransform &b);
  25. inline void operator*=(LocalTransform &a, const LocalTransform &b);
  26. inline LocalTransform relative(LocalTransform &child, const LocalTransform &parent);
  27. // Conversions
  28. inline LocalTransform local_transform(const Matrix4x4 &tm);
  29. inline Matrix4x4 matrix4x4(const LocalTransform &tm);
  30. // Utility
  31. inline Vector3 transform(const LocalTransform &tm, const Vector3 &p);
  32. inline Vector3 transform_without_translation(const LocalTransform &tm, const Vector3 &p);
  33. }
  34. #include "local_transform.inl"