SIMatrix4.TransposeInverseInPlace

SIMatrix4.TransposeInverseInPlace

説明

この行列を、それ自身の転置逆行列に設定します(特異行列でない場合)(this = Transpose(this^-1))。

C#構文

Int32 SIMatrix4.TransposeInverseInPlace();

スクリプト構文

oBoolean = SIMatrix4.TransposeInverseInPlace();

戻り値

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

1. VBScript の例

'

' This example demonstrates how to transpose and invert 

' a 4x4 matrix, store the result of the operation in 

' the first matrix, and then trap whether the invert

' and transpose operation was successful.

'

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)

if m1.TransposeInverseInPlace then

	Application.LogMessage "Success :-D"

else

	Application.LogMessage "Failure :-("

end if

' Expected result:

' INFO : Success :-D

2. JScript の例

/*

	Create two cubes, the first one uses Matrix4.Set function and 

	the second uses the transpose inverse matrix of the first

*/

NewScene(null, false);

var oRoot = Application.ActiveProject.ActiveScene.Root;

var oCube = oRoot.AddGeometry("Cube", "MeshSurface", "CubeOriginal");	

var oCube2 = oRoot.AddGeometry("Cube", "MeshSurface", "CubeTransposed");	

var oTrans = oCube.Kinematics.Local.Transform;

var oTrans2 = oCube2.Kinematics.Local.Transform;

// Change the cube shape	

var oMat4 = XSIMath.CreateMatrix4( 

	1.0, 1.0, 0.0, 10.0, 

	0.0, 1.0, 0.0, 0.0, 

	0.0, 0.0, 1.0, 0.0, 

	0.0, 0.0, 0.0, 1.0 

);

// Original cube

oTrans.SetMatrix4(oMat4);

oCube.Kinematics.Local.Transform = oTrans;

// Transpose inverse cube

oMat4.TransposeInverseInPlace();

oTrans2.SetMatrix4(oMat4);

oCube2.Kinematics.Local.Transform = oTrans2;

関連項目

SIMatrix4.TransposeInverse SIVector3 SIMatrix3 SIMatrix4 SIRotation SITransformation SIQuaternion