| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- $#include "Math/Vector3.h"
- class Vector3
- {
- Vector3();
- Vector3(const Vector3& vector);
- Vector3(const Vector2& vector, float z);
- Vector3(const Vector2& vector);
- Vector3(const IntVector3& vector);
- Vector3(float x, float y, float z);
- Vector3(float x, float y);
- ~Vector3();
- bool operator ==(const Vector3& rhs) const;
- Vector3 operator + (const Vector3& rhs) const;
- Vector3 operator - () const;
- Vector3 operator - (const Vector3& rhs) const;
- Vector3 operator * (float rhs) const;
- Vector3 operator * (const Vector3& rhs) const;
- Vector3 operator / (float rhs) const;
- Vector3 operator / (const Vector3& rhs) const;
- void Normalize();
- float Length() const;
- float LengthSquared() const;
- float DotProduct(const Vector3& rhs) const;
- float AbsDotProduct(const Vector3& rhs) const;
- float ProjectOntoAxis(const Vector3& axis) const;
- Vector3 CrossProduct(const Vector3& rhs) const;
- Vector3 Abs() const;
- Vector3 Lerp(const Vector3& rhs, float t) const;
- bool Equals(const Vector3& rhs) const;
- bool IsNaN() const;
- float Angle(const Vector3& rhs) const;
- Vector3 Normalized() const;
- String ToString() const;
- float x_ @ x;
- float y_ @ y;
- float z_ @ z;
- static const Vector3 ZERO;
- static const Vector3 LEFT;
- static const Vector3 RIGHT;
- static const Vector3 UP;
- static const Vector3 DOWN;
- static const Vector3 FORWARD;
- static const Vector3 BACK;
- static const Vector3 ONE;
- };
- class IntVector3
- {
- IntVector3();
- IntVector3(int x, int y, int z);
- IntVector3(const IntVector3& rhs);
- ~IntVector3();
- bool operator ==(const IntVector3& rhs) const;
- IntVector3 operator + (const IntVector3& rhs) const;
- IntVector3 operator - () const;
- IntVector3 operator - (const IntVector3& rhs) const;
- IntVector3 operator * (int rhs) const;
- IntVector3 operator / (int rhs) const;
- String ToString() const;
- unsigned ToHash() const;
- float Length() const;
- int x_ @ x;
- int y_ @ y;
- int z_ @ z;
- static const IntVector3 ZERO;
- static const IntVector3 LEFT;
- static const IntVector3 RIGHT;
- static const IntVector3 UP;
- static const IntVector3 DOWN;
- static const IntVector3 FORWARD;
- static const IntVector3 BACK;
- static const IntVector3 ONE;
- };
- Vector3 VectorLerp(const Vector3& lhs, const Vector3& rhs, const Vector3& t);
- Vector3 VectorMin(const Vector3& lhs, const Vector3& rhs);
- Vector3 VectorMax(const Vector3& lhs, const Vector3& rhs);
- Vector3 VectorFloor(const Vector3& vec);
- Vector3 VectorRound(const Vector3& vec);
- Vector3 VectorCeil(const Vector3& vec);
- IntVector3 VectorFloorToInt(const Vector3& vec);
- IntVector3 VectorRoundToInt(const Vector3& vec);
- IntVector3 VectorCeilToInt(const Vector3& vec);
- IntVector3 VectorMin(const IntVector3& lhs, const IntVector3& rhs);
- IntVector3 VectorMax(const IntVector3& lhs, const IntVector3& rhs);
- float StableRandom(const Vector3& seed);
|