Vector3.pkg 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. $#include "Vector3.h"
  2. class Vector3
  3. {
  4. Vector3();
  5. Vector3(const Vector3& vector);
  6. Vector3(const Vector2& vector, float z);
  7. Vector3(const Vector2& vector);
  8. Vector3(float x, float y, float z);
  9. Vector3(float x, float y);
  10. ~Vector3();
  11. bool operator == (const Vector3& rhs) const;
  12. Vector3 operator + (const Vector3& rhs) const;
  13. Vector3 operator - () const;
  14. Vector3 operator - (const Vector3& rhs) const;
  15. Vector3 operator * (float rhs) const;
  16. Vector3 operator * (const Vector3& rhs) const;
  17. Vector3 operator / (float rhs) const;
  18. Vector3 operator / (const Vector3& rhs) const;
  19. void Normalize();
  20. float Length() const;
  21. float LengthSquared() const;
  22. float DotProduct(const Vector3& rhs) const;
  23. float AbsDotProduct(const Vector3& rhs) const;
  24. Vector3 CrossProduct(const Vector3& rhs) const;
  25. Vector3 Abs() const;
  26. Vector3 Lerp(const Vector3& rhs, float t) const;
  27. bool Equals(const Vector3& rhs) const;
  28. bool IsNaN() const;
  29. float Angle(const Vector3& rhs) const;
  30. Vector3 Normalized() const;
  31. String ToString() const;
  32. float x_ @ x;
  33. float y_ @ y;
  34. float z_ @ z;
  35. static const Vector3 ZERO;
  36. static const Vector3 LEFT;
  37. static const Vector3 RIGHT;
  38. static const Vector3 UP;
  39. static const Vector3 DOWN;
  40. static const Vector3 FORWARD;
  41. static const Vector3 BACK;
  42. static const Vector3 ONE;
  43. };