TrinityCore
|
#include <Vector2.h>
Static Public Member Functions | |
static Vector2 | random (Random &r=Random::common()) |
static const Vector2 & | zero () |
static const Vector2 & | one () |
static const Vector2 & | unitX () |
static const Vector2 & | unitY () |
static const Vector2 & | inf () |
static const Vector2 & | nan () |
static const Vector2 & | minFinite () |
static const Vector2 & | maxFinite () |
Public Attributes | |
float | x |
float | y |
Private Member Functions | |
bool | operator< (const Vector2 &) const |
bool | operator> (const Vector2 &) const |
bool | operator<= (const Vector2 &) const |
bool | operator>= (const Vector2 &) const |
Do not subclass– this implementation makes assumptions about the memory layout.
|
inline |
Creates the zero vector
G3D::Vector2::Vector2 | ( | class TextInput & | t | ) |
G3D::Vector2::Vector2 | ( | class BinaryInput & | b | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
explicit |
|
inline |
Componentwise absolute value
|
inline |
void G3D::Vector2::deserialize | ( | class BinaryInput & | b | ) |
void G3D::Vector2::deserialize | ( | class TextInput & | t | ) |
|
inline |
Returns a unit-length version of this vector. Returns nan if length is almost zero.
|
inline |
Returns Vector2::zero() is magnitude is almost zero, otherwise returns unit-length vector.
|
inline |
Potentially less accurate but faster than direction(). Only works if System::hasSSE is true.
size_t G3D::Vector2::hashCode | ( | ) | const |
|
inline |
Returns true if this vector has finite length
|
inline |
True if any field is NaN
|
inline |
Returns true if this vector has length == 1
|
inline |
Returns true if this vector has length == 0
|
inline |
Magnitude of the vector
Component-wise maximum
Largest representable vector
Component-wise minimum
smallest (most negative) representable vector
|
inline |
|
inline |
|
inline |
Unary minus
Vector2 G3D::Vector2::operator/ | ( | float | s | ) | const |
Vector2 & G3D::Vector2::operator/= | ( | float | k | ) |
|
inline |
|
inline |
Raise each component of this vector to a power
|
static |
Uniformly distributed random vector on the unit sphere
void G3D::Vector2::serialize | ( | class BinaryOutput & | b | ) | const |
void G3D::Vector2::serialize | ( | class TextOutput & | t | ) | const |
|
inline |
|
inline |
x + y
Any G3D::Vector2::toAny | ( | ) | const |
std::string G3D::Vector2::toString | ( | ) | const |
Vector2 G3D::Vector2::xx | ( | ) | const |
Vector3 G3D::Vector2::xxx | ( | ) | const |
Vector4 G3D::Vector2::xxxx | ( | ) | const |
Vector4 G3D::Vector2::xxxy | ( | ) | const |
Vector3 G3D::Vector2::xxy | ( | ) | const |
Vector4 G3D::Vector2::xxyx | ( | ) | const |
Vector4 G3D::Vector2::xxyy | ( | ) | const |
Vector2 G3D::Vector2::xy | ( | ) | const |
Vector3 G3D::Vector2::xyx | ( | ) | const |
Vector4 G3D::Vector2::xyxx | ( | ) | const |
Vector4 G3D::Vector2::xyxy | ( | ) | const |
Vector3 G3D::Vector2::xyy | ( | ) | const |
Vector4 G3D::Vector2::xyyx | ( | ) | const |
Vector4 G3D::Vector2::xyyy | ( | ) | const |
Vector2 G3D::Vector2::yx | ( | ) | const |
Vector3 G3D::Vector2::yxx | ( | ) | const |
Vector4 G3D::Vector2::yxxx | ( | ) | const |
Vector4 G3D::Vector2::yxxy | ( | ) | const |
Vector3 G3D::Vector2::yxy | ( | ) | const |
Vector4 G3D::Vector2::yxyx | ( | ) | const |
Vector4 G3D::Vector2::yxyy | ( | ) | const |
Vector2 G3D::Vector2::yy | ( | ) | const |
Vector3 G3D::Vector2::yyx | ( | ) | const |
Vector4 G3D::Vector2::yyxx | ( | ) | const |
Vector4 G3D::Vector2::yyxy | ( | ) | const |
Vector3 G3D::Vector2::yyy | ( | ) | const |
Vector4 G3D::Vector2::yyyx | ( | ) | const |
Vector4 G3D::Vector2::yyyy | ( | ) | const |
float G3D::Vector2::x |
float G3D::Vector2::y |