MapWorldPoseToObj ectSpace (XSIMath)

Description

Converts a Pose described in WorldSpace to a different ObjectSpace.

Scripting Syntax

    XSIMath.MapWorldPoseToObjectSpace( ObjectSpace, Pose )

C# Syntax

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

Parameters

Parameter | Type | Description
ObjectSpace | SITransformation | ObjectSpace in which we want to convert the pose.
Pose | SITransformation | Pose to convert.

Return Value

SITransformation (pose)

Examples

VBScript Example

       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

Autodesk Softimage v7.5