Click or drag to resize

VisualMoveTo Method (Visual, Matrix, SpeedProfile)

Move to a new matrix location relative to another visual.

Namespace:  Demo3D.Visuals
Assembly:  Demo3D.Core (in Demo3D.Core.dll) Version: 15.0.2.11458
Syntax
C#
public void MoveTo(
	Visual targetVisual,
	Matrix targetMatrix,
	SpeedProfile speed
)

Parameters

targetVisual
Type: Demo3D.VisualsVisual
The MoveTo will be relative to this visual's initial position and coordinate space. If the visual to be moved is passed in here the movement will be relative to it's initial position. If null is passed in here the MoveTo will be relative to the scene.
targetMatrix
Type: Microsoft.DirectXMatrix
Location to move to relative to the targetVisual's coordinate space in Matrix form.
speed
Type: Demo3D.VisualsSpeedProfile
Speed profile to use.
Examples
C#
// This example will move a visual to the target visual and rotate it 45 degrees
// about the Y axis, at a speed set with a speed profile.
[Auto] SimpleVisualPropertyValue<Visual> target4;
[Auto("OnClick")]
void MoveToVMSp_OnClick(Visual sender, PickInfo pickInfo)
{
    var speed = new SpeedProfile(5, 2, 2);
    sender.MoveTo(target4.Value, Matrix.RotationYDegrees(45), speed);
}
See Also