数学/ベクトルライブラリ用に拡張した Math クラス。 [詳細]
構成 | |
class | RandGenerator |
System.Randomをラップし、ベクトルの乱数生成を拡張したクラス。 [詳細] | |
Static Public メソッド | |
static Matrix4 | LookAt (Vector3 eye, Vector3 center, Vector3 _Up) |
カメラのルックアット行列を計算します。ベクトル(視点、中央)を-zにマップし(OpenGLはZを下向きにみるので)、上方向をyにマップします。 | |
static void | TranslationRotationScale (ref Matrix3 ret, Vector2 translation, Vector2 rotation, Vector2 scale) |
Matrix3 TRS 行列の高速ビルド。 | |
static float | Det (Vector2 value1, Vector2 value2) |
static float | Sign (float x) |
xの符号を返します。xが0.0fなら0.0fを返します。 | |
static Vector2 | Perp (Vector2 value) |
pi/2で回転した値を返します。 | |
static Vector4 | SetAlpha (Vector4 value, float w) |
アルファ値を設定します。(数学式でインライン化することができます) | |
static float | SafeAcos (float x) |
SafeAcos xが[-1,1]の範囲内にあることをチェックし、イプシロンによってオフになるなら、それをクランプします。 | |
static float | Angle (Vector2 value) |
(1,0)と引数 valueのなす2Dの絶対角を、-pi~piの範囲で返します。 | |
static Vector2 | Rotate (Vector2 point, float angle, Vector2 pivot) |
'pivot'を中心に、角度 ' angle'(ラジアン)で 'point'を回転します。 | |
static float | Deg2Rad (float value) |
度数をラジアンに変換します。 | |
static float | Rad2Deg (float value) |
ラジアンを度数に変換します。 | |
static Vector2 | Deg2Rad (Vector2 value) |
度数をラジアンに変換します。 | |
static Vector2 | Rad2Deg (Vector2 value) |
ラジアンを度数に変換します。 | |
static float | Lerp (float a, float b, float x) |
線形補間。 | |
static Vector2 | Lerp (Vector2 a, Vector2 b, float x) |
線形補間。 | |
static Vector3 | Lerp (Vector3 a, Vector3 b, float x) |
線形補間。 | |
static Vector4 | Lerp (Vector4 a, Vector4 b, float x) |
線形補間。 | |
static Vector2 | LerpUnitVectors (Vector2 va, Vector2 vb, float x) |
2つの単位ベクトルで線形補間を行います。補間はパスの短い側で行います。 | |
static float | LerpAngles (float a, float b, float x) |
引数の2つの角度で線形補間を行います。補間はパスの短い側で行います。 | |
static float | Sin (uint period, float phase, uint mstime) |
uint型の値をとる、安全なサイン関数。 | |
static float | Sin (ulong period, float phase, ulong mstime) |
ulong型の値をとる、安全なサイン関数。 | |
static float | Linear (float x) |
この関数は単なる f(x)=x です。Tween関数として渡すとき、コードをより明快にするため定義されています。 | |
static float | PowerfulScurve (float x, float p1, float p2) |
制御可能な曲線であり、少ないコードでカーブのイン/アウト多項式を容易に行うことができます。 | |
static float | PowEaseIn (float x, float p) |
Ease in curve using Pow. | |
static float | PowEaseOut (float x, float p) |
Ease out curve using Pow. | |
static float | PowEaseInOut (float x, float p) |
PowEaseIn/PowEaseOut mirrored around 0.5,0.5. | |
static float | ExpEaseOut (float x, float a) |
Ease out curve using a 1-exp(-a*x) exponential, but normalized so that we reach 1 when x=1. | |
static float | ExpEaseIn (float x, float a) |
Ease in curve using an exponential. | |
static float | BackEaseIn (float x, float a) |
BackEaseIn function (see http://www.robertpenner.com) | |
static float | BackEaseOut (float x, float a) |
BackEaseOut function (see http://www.robertpenner.com) | |
static float | BackEaseInOut (float x, float p) |
BackEaseIn/BackEaseOut mirrored around 0.5,0.5. | |
static float | Impulse (float x, float b) |
Impulse function (source Inigo Quilez). | |
static float | ShockWave (float d, float time, float wave_half_width, float wave_speed, float wave_fade, float d_scale) |
Travelling wave function. | |
static int | Log2 (int v) |
Return the log of v in base 2. | |
static bool | IsPowerOf2 (int i) |
'i'が2のべき乗である場合、trueを返します。 | |
static int | GreatestOrEqualPowerOf2 (int i) |
引数 i に大きい側で最も近い、もしくは等しい2のべき乗を返します。 | |
static Vector2 | ClosestSegmentPoint (Vector2 P, Vector2 A, Vector2 B) |
Return the closest point to P that's on segment [A,B]. | |
Static Public 変数 | |
static Vector2i | _00i = new Vector2i(0,0) |
static Vector2i | _10i = new Vector2i(1,0) |
static Vector2i | _01i = new Vector2i(0,1) |
static Vector2i | _11i = new Vector2i(1,1) |
static Vector3i | _000i = new Vector3i(0,0,0) |
static Vector3i | _100i = new Vector3i(1,0,0) |
static Vector3i | _010i = new Vector3i(0,1,0) |
static Vector3i | _110i = new Vector3i(1,1,0) |
static Vector3i | _001i = new Vector3i(0,0,1) |
static Vector3i | _101i = new Vector3i(1,0,1) |
static Vector3i | _011i = new Vector3i(0,1,1) |
static Vector3i | _111i = new Vector3i(1,1,1) |
static Vector2 | _00 = new Vector2(0.0f,0.0f) |
static Vector2 | _10 = new Vector2(1.0f,0.0f) |
static Vector2 | _01 = new Vector2(0.0f,1.0f) |
static Vector2 | _11 = new Vector2(1.0f,1.0f) |
static Vector3 | _000 = new Vector3(0.0f,0.0f,0.0f) |
static Vector3 | _100 = new Vector3(1.0f,0.0f,0.0f) |
static Vector3 | _010 = new Vector3(0.0f,1.0f,0.0f) |
static Vector3 | _110 = new Vector3(1.0f,1.0f,0.0f) |
static Vector3 | _001 = new Vector3(0.0f,0.0f,1.0f) |
static Vector3 | _101 = new Vector3(1.0f,0.0f,1.0f) |
static Vector3 | _011 = new Vector3(0.0f,1.0f,1.0f) |
static Vector3 | _111 = new Vector3(1.0f,1.0f,1.0f) |
static Vector4 | _0000 = new Vector4(0.0f,0.0f,0.0f,0.0f) |
static Vector4 | _1000 = new Vector4(1.0f,0.0f,0.0f,0.0f) |
static Vector4 | _0100 = new Vector4(0.0f,1.0f,0.0f,0.0f) |
static Vector4 | _1100 = new Vector4(1.0f,1.0f,0.0f,0.0f) |
static Vector4 | _0010 = new Vector4(0.0f,0.0f,1.0f,0.0f) |
static Vector4 | _1010 = new Vector4(1.0f,0.0f,1.0f,0.0f) |
static Vector4 | _0110 = new Vector4(0.0f,1.0f,1.0f,0.0f) |
static Vector4 | _1110 = new Vector4(1.0f,1.0f,1.0f,0.0f) |
static Vector4 | _0001 = new Vector4(0.0f,0.0f,0.0f,1.0f) |
static Vector4 | _1001 = new Vector4(1.0f,0.0f,0.0f,1.0f) |
static Vector4 | _0101 = new Vector4(0.0f,1.0f,0.0f,1.0f) |
static Vector4 | _1101 = new Vector4(1.0f,1.0f,0.0f,1.0f) |
static Vector4 | _0011 = new Vector4(0.0f,0.0f,1.0f,1.0f) |
static Vector4 | _1011 = new Vector4(1.0f,0.0f,1.0f,1.0f) |
static Vector4 | _0111 = new Vector4(0.0f,1.0f,1.0f,1.0f) |
static Vector4 | _1111 = new Vector4(1.0f,1.0f,1.0f,1.0f) |
static Vector4 | UV_TransformIdentity = new Vector4( 0.0f, 0.0f, 1.0f, 1.0f ) |
UV transform stored as (offset, scale) in a Vector4. | |
static Vector4 | UV_TransformFlipV = new Vector4( 0.0f, 1.0f, 1.0f, -1.0f ) |
UV transform stored as (offset, scale) in a Vector4 UV_TransformFlipV v into 1-v, and leaves u unchanged. | |
プロパティ | |
static float | Pi [get] |
static float | TwicePi [get] |
2pi | |
static float | HalfPi [get] |
pi/2 |
数学/ベクトルライブラリ用に拡張した Math クラス。
static float PowEaseInOut | ( | float | x, |
float | p | ||
) | [static] |
PowEaseIn/PowEaseOut mirrored around 0.5,0.5.
Same exponent in and out.
static float PowerfulScurve | ( | float | x, |
float | p1, | ||
float | p2 | ||
) | [static] |
制御可能な曲線であり、少ないコードでカーブのイン/アウト多項式を容易に行うことができます。
x | Asssumed to be in 0,1. |
p1 | Controls the ease in exponent (if >1). |
p2 | Controls the ease out exponent (if >1.),(p1,p2)=(1,1) just gives f(x)=x |
Vector4 UV_TransformIdentity = new Vector4( 0.0f, 0.0f, 1.0f, 1.0f ) [static] |
UV transform stored as (offset, scale) in a Vector4.
offset=0,0 scale=1,1 means identity.
float HalfPi [static, get] |
pi/2
float Pi [static, get] |
float TwicePi [static, get] |
2pi