SIMatrix4.Invert

説明

行列 m を反転し、結果をこの行列に格納します(this = m^-1)。

スクリプト 構文

oBoolean = SIMatrix4.Invert( m );

戻り値

Boolean。行列 m が逆行列を持つ(m が特異でない)場合は True、逆行列を持たない場合は false。

パラメータ

パラメータ タイプ 詳細
m SIMatrix4 行列オペランド

VBScript の例

'
' This example demonstrates how to set up a 4x4 matrix, 
' invert it and then trap whether the inversion was
' successful
'
' Create 4x4 matrices
dim m1 : set m1 = XSIMath.CreateMatrix4(_
        2.0, 3.0, 0.0, 0.0, _ 
        1.0, 4.0, 0.0, 0.0, _
        0.0, 0.0, 1.0, 0.0, _
        0.0, 0.0, 0.0, 1.0)
dim m2 : set m2 = XSIMath.CreateMatrix4
' Make the second matrix the inversion of the first
if m2.Invert(m1) then
        Application.LogMessage "Success :-D"
else
        Application.LogMessage "Failure :-("
end if
' Expected result:
' INFO : Success :-D

関連項目

SIMatrix4.InvertInPlace SIVector3 SIMatrix3 SIMatrix4 SIRotation SITransformation SIQuaternion