0

Two questions on Manipulator

Anonymous 10 years ago 0
This discussion was imported from CodePlex

damianoslebo wrote at 2013-02-12 01:36:

Hi I am using the code behind with manipulators in my program with the following code:
        CubeVisual3D box = new CubeVisual3D();
        box.Center = new Point3D(x, y, z);
        CombinedManipulator boxManipulator = new CombinedManipulator();
        boxManipulator.Position = box.Center;
        boxManipulator.Pivot = box.Center;
        boxManipulator.CanRotateX = false;//true;
        boxManipulator.CanRotateY = false;// true;
        boxManipulator.CanRotateZ = false;// true;
        boxManipulator.CanTranslateX = false;// true;
        boxManipulator.CanTranslateY = false;// true;
        boxManipulator.CanTranslateZ = true;
        boxManipulator.Bind(box);
        vp.Children.Add(boxManipulator);
        vp.Children.Add(box);
        globalManipulatorList.Add(boxManipulator);
I can get the manipulator to work in the x and y and all rotation directions, however the Z translate direction does not show up on the viewport. I don't know why the other directions work but Z does not work.

The second question is what event can invoke when using a transparent bounding volume to detect a mouse left button down on the manipulator? I have been using the VisualTreeHelper.HitTest method to ignore transparent geometry before now but I don't know what method can be invoked once a manipulator is found by the VisualTreeHelper.HitTest method.

Thanks for the help,
Damian

objo wrote at 2013-03-12 11:41:

1: Thanks for the notice - I see some change had broken the TranslateManipulator. I removed the default value of the Direction property, now it seems to work again.

2: Sorry, I don't quite understand the problem here. Please make an example that we can debug!