クラス GcAffine
Namespace: GameCanvas
csharp
public static class GcAffine2次元アフィン変換
フィールド
Identity
csharp
public static readonly float2x3 Identity = new(1f, 0f, 0f, 0f, 1f, 0f)単位行列(なにも移動・回転・拡縮を行わない場合の変換行列)
メソッド
CalcRotate(float2x3)
csharp
public static float CalcRotate(this in float2x3 mtx)変換行列から回転成分を取り出します
パラメーター
mtx— 変換行列
戻り値
回転量(弧度法)
CalcScale(float2x3)
csharp
public static float2 CalcScale(this in float2x3 mtx)変換行列から拡縮成分を取り出します
パラメーター
mtx— 変換行列
戻り値
拡縮率
CalcTRS(float2x3, float2, float, float2)
csharp
public static void CalcTRS(this in float2x3 mtx, out float2 translate, out float rotate, out float2 scale)変換行列から移動・回転・拡縮成分を取り出します
パラメーター
mtx— 変換行列translate— 移動量rotate— 回転量(弧度法)scale— 拡縮率
FromRotate(float)
csharp
public static float2x3 FromRotate(in float radian)回転成分から変換行列を作ります
パラメーター
radian— 回転量(弧度法)
戻り値
変換行列
FromRotate(float2, float)
csharp
public static float2x3 FromRotate(in float2 ahchor, in float radian)ahchorを中心とした回転成分から変換行列を作ります
パラメーター
ahchor— 回転中心radian— 回転量(弧度法)
戻り値
変換行列
FromScale(float)
csharp
public static float2x3 FromScale(in float scale)拡縮成分から変換行列を作ります
パラメーター
scale— 拡縮率
戻り値
変換行列
FromScale(float2)
csharp
public static float2x3 FromScale(in float2 scale)拡縮成分から変換行列を作ります
パラメーター
scale— 拡縮率
戻り値
変換行列
FromShear(float2)
csharp
public static float2x3 FromShear(in float2 shear)せん断成分から変換行列を作ります
パラメーター
shear— せん断係数
戻り値
変換行列
FromTranslate(float2)
csharp
public static float2x3 FromTranslate(in float2 translate)移動成分から変換行列を作ります
パラメーター
translate— 移動量
戻り値
変換行列
FromTRS(float2, float, float2)
csharp
public static float2x3 FromTRS(in float2 translate, in float rotate, in float2 scale)移動・回転・拡縮成分から変換行列を作ります
パラメーター
translate— 移動量rotate— 回転量(弧度法)scale— 拡縮率
戻り値
変換行列
FromTS(float2, float2)
csharp
public static float2x3 FromTS(in float2 translate, in float2 scale)移動・拡縮成分から変換行列を作ります
パラメーター
translate— 移動量scale— 拡縮率
戻り値
変換行列
GetShear(float2x3)
csharp
public static float2 GetShear(this in float2x3 mtx)変換行列からせん断成分を取り出します
パラメーター
mtx— 変換行列
戻り値
せん断係数
GetTranslate(float2x3)
csharp
public static float2 GetTranslate(this in float2x3 mtx)変換行列から移動成分を取り出します
パラメーター
mtx— 変換行列
戻り値
移動量
Mul(float2x3, float2)
csharp
public static float2 Mul(this in float2x3 mtx, in float2 vec)行列とベクトルの積を求めます
パラメーター
mtx— 変換前の行列vec— ベクトル
戻り値
行列とベクトルの積
Mul(float2x3, float2x3)
csharp
public static float2x3 Mul(this in float2x3 lhs, in float2x3 rhs)行列同士の積を求めます
パラメーター
lhs— 左辺rhs— 右辺
戻り値
行列同士の積
Rotate(float2, float)
csharp
public static float2 Rotate(this in float2 vec, in float radian)ベクトルを回転させます
パラメーター
vec— 回転前のベクトルradian— 回転量(弧度法)
戻り値
回転後のベクトル
ToFloat4x4(float2x3)
csharp
public static float4x4 ToFloat4x4(this in float2x3 mtx)2次元変換行列を3次元変換行列に変換します
パラメーター
mtx— 2次元変換行列
戻り値
3次元変換行列
