@@ -175,6 +175,32 @@ public Fixed4x4(
175175 this . m30 = m30 ; this . m31 = m31 ; this . m32 = m32 ; this . m33 = m33 ;
176176 }
177177
178+ /// <summary>
179+ /// Creates a matrix from four row vectors.
180+ /// </summary>
181+ [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
182+ public static Fixed4x4 FromRows ( Vector4d row0 , Vector4d row1 , Vector4d row2 , Vector4d row3 )
183+ {
184+ return new Fixed4x4 (
185+ row0 . x , row0 . y , row0 . z , row0 . w ,
186+ row1 . x , row1 . y , row1 . z , row1 . w ,
187+ row2 . x , row2 . y , row2 . z , row2 . w ,
188+ row3 . x , row3 . y , row3 . z , row3 . w ) ;
189+ }
190+
191+ /// <summary>
192+ /// Creates a matrix from four column vectors.
193+ /// </summary>
194+ [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
195+ public static Fixed4x4 FromColumns ( Vector4d column0 , Vector4d column1 , Vector4d column2 , Vector4d column3 )
196+ {
197+ return new Fixed4x4 (
198+ column0 . x , column1 . x , column2 . x , column3 . x ,
199+ column0 . y , column1 . y , column2 . y , column3 . y ,
200+ column0 . z , column1 . z , column2 . z , column3 . z ,
201+ column0 . w , column1 . w , column2 . w , column3 . w ) ;
202+ }
203+
178204 #endregion
179205
180206 #region Properties
@@ -1279,6 +1305,15 @@ private static bool FullInvert(Fixed4x4 matrix, out Fixed4x4 result)
12791305 return true ;
12801306 }
12811307
1308+ /// <summary>
1309+ /// Transforms a 4D vector by a 4x4 matrix, preserving the computed W component.
1310+ /// </summary>
1311+ [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
1312+ public static Vector4d Transform ( Fixed4x4 matrix , Vector4d vector )
1313+ {
1314+ return Vector4d . Transform ( matrix , vector ) ;
1315+ }
1316+
12821317 /// <summary>
12831318 /// Transforms a point from local space to world space using this transformation matrix.
12841319 /// </summary>
0 commit comments