Matrix Split ノード
説明
入力 In で定義される正方行列をベクトルに分割します。出力ベクトルの次元は入力行列の次元によって定義されます。
ノードのドロップダウンメニューで、入力行列の行と列のどちらから入力値を取得するかを選択できます。
- Row: 入力ベクトルが、上から下へ、行列の行によって構成されます。
- Column: 入力ベクトルが、左から右へ、行列の列によって構成されます。
Matrix 2x2 タイプあるいは Matrix 3x3 タイプの入力行列は、それより高い次元の行または列 (ドロップダウンメニューの選択項目による) には、0 の値を返します。
例えば、Matrix 2x2 タイプを入力 In に接続すると、出力スロット M0 および M1 には正しい Vector 2 タイプの出力が返され、出力 M2 および M3 には 0 値が返されます。
ポート
Name |
Direction |
タイプ |
説明 |
In |
入力 |
任意の行列型 |
入力値 |
M0 |
出力 |
任意のベクトル型 |
1 番目の行または列 |
M1 |
出力 |
任意のベクトル型 |
2 番目の行または列 |
M2 |
出力 |
任意のベクトル型 |
3 番目の行または列 |
M3 |
出力 |
任意のベクトル型 |
4 番目の行または列 |
制御
Name |
タイプ |
オプション |
説明 |
|
ドロップダウン |
Row、Column |
出力ベクトルを埋め方を選択します。 |
生成されるコードの例
以下のサンプルコードは、このノードの出力の一例を示したものです。
float2 _MatrixSplit_M0 = float2(In[0].r, In[0].g);
float2 _MatrixSplit_M1 = float2(In[1].r, In[1].g);
float2 _MatrixSplit_M2 = float2(0, 0);
float2 _MatrixSplit_M3 = float2(0, 0);
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.