Translation (SITransformation)

Introduced

5.1

Description

Sets or returns the translation SIVector3 of this transformation (the vector is created automatically).

C# Syntax

    // get accessor
    SIVector3 rtn = ISITransformation.Translation;

    // set accessor
    ISITransformation.Translation = SIVector3;

Examples

JScript Example

    /*
       This example demonstrates how to use the Translation property to return the translation
       portion of the transformation as an SIVector3 (without having to explicitly create it
       first) as well as how to set a new value for the translation.
    */

    var t1 = XSIMath.CreateTransform();

    // The Translation property takes care of creating oVec as an SIVector3
    var oVec = t1.Translation;

    var l_dx = 0;
    var l_dy = 1;
    var l_dz = 2;

    oVec.Set(l_dx, l_dy, l_dz);
    t1.Translation = oVec;

    Application.LogMessage(" The x,y,z position of the transformation are: "
           + t1.PosX + " " + t1.PosY + " " + t1.PosZ );

    // Expected results:
    //INFO :  The x,y,z position of the transformation are: 0 1 2

See Also

SITransformation.GetTranslation | SITransformation.SetTranslation

Autodesk Softimage v7.5