Vector3.pkg 1.4 KB

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