I have taken a look at Helix-3d examples, specifically a Manipulator Example and I tried to reproduce the functionality in C#.
I have a Window with HelixViewport3D and the following code:
public partial class TransformWindow : Window
{
public TransformWindow()
{
InitializeComponent();
BoxVisual3D box = new BoxVisual3D();
Point3D position = new Point3D(3,4,5);
box.Center = position;
Viewport3D.Children.Add(box);
TranslateManipulator manipulator1 = new TranslateManipulator();
manipulator1.Bind(box);
manipulator1.Color = Colors.Red;
manipulator1.Direction = new Vector3D(1,0,0);
manipulator1.Diameter = 0.1;
//manipulator1.Position = position;
Viewport3D.Children.Add(manipulator1);
}
}
This code adds arrow that I can use to move the box, but the manipulator arrow is positioned in the center of the viewport. I would like it to protrude out of the box. If I use the position to position it initially, then the initial position is correct, but manipulator arrow stays put as I move the object. How can I make manipulator stay correctly positioned (protruding from object at all time)?