X3DObject.LocalScaling

Introduced

v3.5.1

Description

Returns or sets the object's local scaling. This acts as a shortcut to accessing the scaling SIVector3 through Kinematics, local KinematicState, and SITransformation.

Examples

VBScript Example

' 
' This example illustrates how to get/set local scaling using
' two different approaches
' 
set oNull1 = Application.ActiveSceneRoot.AddNull()
set oNull2 = Application.ActiveSceneRoot.AddNull()
' ACCESSING
' Access the local scaling using the KinematicState
set oTransform = oNull1.Kinematics.Local.Transform
set oScaling = oTransform.Scaling
' Access the local scaling using X3DObject.LocalScaling
set oScaling2 = oNull2.LocalScaling
' SETTING
' Set the local scaling using the KinematicState
oTransform.SetScalingFromValues 2.0, 1.0, 1.0
oNull1.Kinematics.Local.Transform = oTransform
' Set the local scaling using X3DObject.LocalScaling
oScaling2.Set 2.0, 1.0, 1.0
oNull2.LocalScaling = oScaling2