GetAxisAngle2 (SIRotation)

Description

Extracts the axis and angle from this rotation (ordered the same as SIRotation.GetAxisAngle).

Note: This method must be used with scripting languages that don't support arguments passed by reference such as JScript. For more information on getting output arguments, see About Output Argument Arrays.

Scripting Syntax

    SIRotation.GetAxisAngle2( axis )

C# Syntax

    Object SIRotation.GetAxisAngle2( SIVector3 io_pAxis );

Parameters

Parameter | Type | Description
axis [in/out] | SIVector3 | Softimage will fill in the vector with the axis of rotation

Return Value

Floating point value containing the angle of rotation (in radians)

Examples

JScript Example

    var r1 = XSIMath.CreateRotation();

    r1.SetFromXYZAnglesValues(
           XSIMath.DegreesToRadians( 90 ),
           XSIMath.DegreesToRadians( 45 ),
           0 ) ;

    var axis = XSIMath.CreateVector3();

    var angle = r1.GetAxisAngle2( axis );

    Application.LogMessage( "Axis: " + axis.x +","+ axis.y +","+ axis.z );
    Application.LogMessage( "Angle: " + XSIMath.RadiansToDegrees( angle ) );

    //Output:
    //INFO : Axis: 0.8628562094610168,0.3574067443365933,-0.35740674433659325
    //INFO : Angle: 98.42105811814942

See Also

SIRotation.GetAxisAngle

Autodesk Softimage v7.5