XSIMath.MapWorldPoseToObjectSpace

説明

WorldSpace で記述されたポーズを、異なる ObjectSpace に変換します。

C#構文

SITransformation XSIMath.MapWorldPoseToObjectSpace( SITransformation in_pObjectSpace, SITransformation in_pPose );

スクリプト構文

oReturn = XSIMath.MapWorldPoseToObjectSpace( ObjectSpace, Pose );

戻り値

SITransformation(ポーズ)

パラメータ

パラメータ タイプ 説明
ObjectSpace SITransformation ポーズを変換する先の ObjectSpace
Pose SITransformation 変換するポーズ

VBScript の例

set oRoot = Application.ActiveProject.ActiveScene.Root

	set oCube = oRoot.AddGeometry("Cube","MeshSurface")

	oCube.Kinematics.Global.Parameters("posy").value = 4.0

	oCube.Kinematics.Global.Parameters("posx").value = 2.0

	set oCube2 = oRoot.AddGeometry("Cube","MeshSurface")

	oCube2.Kinematics.Global.Parameters("roty").value = 45.0

	oCube2.Kinematics.Global.Parameters("posz").value = -2.0

	set oTransfo = GetObjectPoseRelativeToOther(oCube, oCube2)

	'Function that gets the local pose of an object if it would be parented under another object

	Function GetObjectPoseRelativeToOther(in_obj1, in_obj2)

		Dim l_srcPose, l_destPose

		set l_srcPose = in_obj1.Kinematics.Global.Transform

		set l_destPose = in_obj2.Kinematics.Global.Transform

		set GetObjectPoseRelativeToOther = XSIMath.MapWorldPoseToObjectSpace(l_srcPose, l_destPose)

	End Function