Vector3.pkg 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. bool operator == (const Vector3& rhs) const;
  9. Vector3 operator + (const Vector3& rhs) const;
  10. Vector3 operator - () const;
  11. Vector3 operator - (const Vector3& rhs) const;
  12. Vector3 operator * (float rhs) const;
  13. Vector3 operator * (const Vector3& rhs) const;
  14. Vector3 operator / (float rhs) const;
  15. Vector3 operator / (const Vector3& rhs) const;
  16. Vector3 operator / (const Vector3& rhs) const;
  17. float 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. Vector3 Normalized() const;
  27. String ToString() const;
  28. float x_ @ x;
  29. float y_ @ y;
  30. float z_ @ z;
  31. static const Vector3 ZERO;
  32. static const Vector3 LEFT;
  33. static const Vector3 RIGHT;
  34. static const Vector3 UP;
  35. static const Vector3 DOWN;
  36. static const Vector3 FORWARD;
  37. static const Vector3 BACK;
  38. static const Vector3 ONE;
  39. };