語言

Matrix4x4.WithElement(Int32, Int32, Single) 方法

定義

建立一個新 Matrix4x4 Java,將指定列的元素設定為給定值,其餘元素則設定為與當前矩陣相同的值。

public:
 System::Numerics::Matrix4x4 WithElement(int row, int column, float value);
public readonly System.Numerics.Matrix4x4 WithElement(int row, int column, float value);
member this.WithElement : int * int * single -> System.Numerics.Matrix4x4
Public Function WithElement (row As Integer, column As Integer, value As Single) As Matrix4x4

參數

row
Int32

包含要替換元素的列索引。

column
Int32

包含要替換元素的欄位索引。

value
Single

應指派給索引元素的值:[row, column]。

傳回

A Matrix4x4 的元素值為索引:[row, column],設為 , value 其餘元素則與當前矩陣中的值相同。

例外狀況

row 小於零或大於等於行數(4)。

-或-

column 小於零或大於等於欄位數(4)。

適用於