Public Member Functions |
| Vector2 () |
| すべての要素を 0.0 に設定してインスタンスを初期化します。
|
| Vector2 (float x, float y) |
| 指定した値を使用してインスタンスを初期化します。
|
void | Set (float x, float y) |
| 各要素に値を設定します。
|
float | GetLength () const |
| このベクトルの長さを返します。
|
float | GetLengthSquared () const |
| このベクトルの長さの 2 乗を返します。
|
void | Normalize () |
| このベクトルを正規化します。
|
void | TransformCoord (const Matrix &mat) |
| 指定された行列を使用してこのベクトルを座標変換します。
|
bool | IsNaNOrInf () const |
| 要素のいずれかが NaN または Inf かを判別します。
|
void | Print (const char *format=NULL, FILE *stream=NULL) const |
| デバッグ用に文字列を標準出力します。
|
Vector2 & | operator+= (const Vector2 &v) |
Vector2 & | operator+= (float v) |
Vector2 & | operator-= (const Vector2 &v) |
Vector2 & | operator-= (float v) |
Vector2 & | operator*= (const Vector2 &v) |
Vector2 & | operator*= (float v) |
Vector2 & | operator/= (const Vector2 &v) |
Vector2 & | operator/= (float v) |
bool | operator== (const Vector2 &v) const |
bool | operator!= (const Vector2 &v) const |
Static Public Member Functions |
static Vector2 | Normalize (const Vector2 &vec) |
| 指定ベクトルを正規化したベクトルを返します。
|
static float | Dot (const Vector2 &vec1, const Vector2 &vec2) |
| 2つのベクトルの内積を計算します。
|
static Vector2 | Min (const Vector2 &vec1, const Vector2 &vec2) |
| 2つのベクトルの最小値で構成されるベクトルを返します。
|
static Vector2 | Max (const Vector2 &vec1, const Vector2 &vec2) |
| 2つのベクトルの最大値で構成されるベクトルを返します。
|
static Vector4 | Transform (const Vector2 &vec, const Matrix &mat) |
| 指定された行列を使用してベクトルを座標変換します。
|
static Vector2 | TransformCoord (const Vector2 &vec, const Matrix &mat) |
| 指定された行列を使用してベクトルを座標変換します。
|
static Vector2 | Lerp (const Vector2 &start, const Vector2 &end, float t) |
| 2 つのベクトル間の線形補間を行います。
|
static Vector2 | Hermite (const Vector2 &v1, const Vector2 &a1, const Vector2 &v2, const Vector2 &a2, float t) |
| 指定されたベクトルを使用して エルミートスプライン補間を実行します。
|
static Vector2 | CatmullRom (const Vector2 &vec1, const Vector2 &vec2, const Vector2 &vec3, const Vector2 &vec4, float t) |
| 指定されたベクトルを使用して Catmull-Rom 補間を行います。
|
Public Attributes |
float | X |
| X 要素
|
float | Y |
| Y 要素
|
Static Public Attributes |
static const Vector2 | Zero |
| Vector2(0, 0)
|
static const Vector2 | UnitX |
| Vector2(1, 0)
|
static const Vector2 | UnitY |
| Vector2(0, 1)
|
static const Vector2 | One |
| Vector2(1, 1)
|
Friends |
Vector2 | operator+ (const Vector2 &v1, const Vector2 &v2) |
Vector2 | operator+ (const Vector2 &v1, float v2) |
Vector2 | operator+ (float v1, const Vector2 &v2) |
Vector2 | operator- (const Vector2 &v1, const Vector2 &v2) |
Vector2 | operator- (const Vector2 &v1, float v2) |
Vector2 | operator- (float v1, const Vector2 &v2) |
Vector2 | operator* (const Vector2 &v1, const Vector2 &v2) |
Vector2 | operator* (const Vector2 &v1, float v2) |
Vector2 | operator* (float v1, const Vector2 &v2) |
Vector2 | operator/ (const Vector2 &v1, const Vector2 &v2) |
Vector2 | operator/ (const Vector2 &v1, float v2) |
Vector2 | operator/ (float v1, const Vector2 &v2) |
Vector2 | operator- (const Vector2 &v1) |