SITransformation

Object Hierarchy | 関連する C++クラス:CTransformation

説明

ISITransformation オブジェクトは、スケーリング、回転、移動を S、R、t の順で組み合わせた結果である変換です。

メソッド

AddLocalRotation AddLocalScaling AddLocalTranslation AddParentRotation
AddParentScaling AddParentTranslation Copy GetMatrix4
GetRotation GetRotationAxisAngle GetRotationAxisAngle2 GetRotationMatrix3
GetRotationQuaternion GetRotationXYZAngles GetRotationXYZAnglesValues GetRotationXYZAnglesValues2
GetScaling GetScalingOrientationXYZAngles GetScalingOrientationXYZAngles2 GetScalingValues
GetScalingValues2 GetTranslation GetTranslationValues GetTranslationValues2
HasScalingOrientation Mul MulInPlace SetIdentity
SetMatrix4 SetRotation SetRotationFromAxisAngle SetRotationFromMatrix3
SetRotationFromQuaternion SetRotationFromXYZAngles SetRotationFromXYZAnglesValues SetRotationFromXYZAxes
SetScaling SetScalingFromValues SetScalingOrientationFromXYZAngles SetTranslation
SetTranslationFromValues      
       

プロパティ

Matrix4 PosX PosY PosZ
RotX RotY RotZ Rotation
Scaling SclX SclY SclZ
Translation      
       

1. JScript の例

/*

	Example of how to use the SITransformation to read and write 

	the scaling, rotation and translation of an object

*/

var oNull = Application.ActiveSceneRoot.AddNull( "MyNull" ) ;

// Change the position and rotation of the null

// by providing a new transform

oNewLocalTransform = XSIMath.CreateTransform() ;

// Change posx, posy

oNewLocalTransform.PosX = 5; 

oNewLocalTransform.PosX = 6; 

// Set rotx to 180 degrees

oNewLocalTransform.RotX = 180;

// Scale y-axis (scly)

oNewLocalTransform.SclY = 2; 

oNull.Kinematics.Local.Transform = oNewLocalTransform ;

PrintTransformation( oNull.Kinematics.Local.Transform ) ;

// Show the "SRT: of a SITransformation object

function PrintTransformation( in_oTransform )

{

	var oVector = XSIMath.CreateVector3();

	in_oTransform.GetScaling( oVector ) ;

	PrintVector( "Scaling:", oVector ) ;

	// In Radians

	in_oTransform.GetRotationXYZAngles( oVector ) ;

	PrintVector( "Rotation:", oVector ) ;

	in_oTransform.GetTranslation( oVector ) ;

	PrintVector( "Translation:", oVector ) ;

}

// Print a vector.  Values are rounded to 3 decimal places

function PrintVector( in_Prefix, in_oVec )

{

	Application.LogMessage( in_Prefix + " " + 

			XSIRound(in_oVec.x,3) + ", " + 

			XSIRound(in_oVec.y,3) + ", " + 

			XSIRound(in_oVec.z,3) ) ;

}

// Output:

//INFO : Scaling: 1, 2, 1

//INFO : Rotation: 3.142, 0, 0

//INFO : Translation: 5, 6, 0

2. VBScript の例

dim transfo

set transfo = XSIMath.CreateTransform

Application.LogMessage TypeName(transfo)

関連項目

SIVector3 SIMatrix3 SIMatrix4 SIRotation SITransformation SIQuaternion KinematicState.Transform StaticKinematicState.Transform