SIRotation.XYZAngles

Introduced

v5.1

Description

Sets or returns the x,y,z SIVector3 of this rotation (the vector is created automatically).

C# Syntax

// get accessor
SIVector3 rtn = ISIRotation.XYZAngles;
// set accessor
ISIRotation.XYZAngles = SIVector3;

Examples

JScript Example

/*
	This example demonstrates how to use rotation property XYZAngles
	This example demonstrates how to use XYZAngles property to return the x,y,z vector of the rotation 
	as an SIVector3 (without having to explicitly create it first) as well as how to set new values.
*/
var oRot = XSIMath.CreateRotation();
// The XYZAngles property takes care of creating oVec as an SIVector3
var oVec = oRot.XYZAngles;
var l_dx = XSIMath.DegreesToRadians(20);
var l_dy = XSIMath.DegreesToRadians(45);
var l_dz = XSIMath.DegreesToRadians(90);
oVec.Set(l_dx, l_dy, l_dz) ;
oRot.XYZAngles = oVec;
Application.LogMessage(" The x,y,z angles of the rotation are: " + oRot.RotX + " " + oRot.RotY + " " + oRot.RotZ );
// Expected results:
//INFO :  The x,y,z angles of the rotation are: 20 45 90

See Also

SIRotation.GetXYZAngles SIRotation.GetXYZAnglesValues SIRotation.GetXYZAnglesValues2 SIRotation.SetFromXYZAnglesValues SIRotation.SetFromXYZAngles