I have a class implementing the triad manipulator callbacks. I successfully create the triad and get the callbacks.
public class ManipulatorHandler : SwManipulatorHandler2
<snip>
public override bool OnDoubleValueChanged(object pManipulator, int handleIndex, ref double Value)
{
var xAxis = (MathVector)_Math.CreateVector(new[] {1, 0, 0});
var yAxis = (MathVector)_Math.CreateVector(new[] {0, 1, 0});
var zAxis = (MathVector)_Math.CreateVector(new[] {0, 0, 1});
var value = Value;
var translate =(MathVector)_Math.CreateVector(new[] {handleIndex == 1 ? value : 0, handleIndex == 2 ? value : 0, handleIndex == 3 ? value : 0});
var transform = _Math.ComposeTransform(xAxis, yAxis, zAxis, translate,1);
if(!Body.ApplyTransform(transform))
throw new Exception("Unable to shift");
IModelView view = ((IModelView)_ModelDoc.ActiveView);
view.GraphicsRedraw(null);
return true;
}
<snip>
};
However the body does not redraw. The temporary body has been previously inserted when the manipulator was created and even though the body is transformed it maintains it's original inserted position in the view. Any ideas?
Try hide temp body via Body2::Hide and then display it again via IBody2::Display3. I think you cannot alter the position of the displayed body (I think this is just a cache rather than a body)