|
To
change the translation to the XZ plane you'll have to create a
z_factor.
Change
the setFactor methods something like this:
public void setFactor( double
xFactor, double yFactor, double zFactor)
{ x_factor =
xFactor; y_factor =
yFactor; z_factor =
zFactor; }
then you can
change
translation.y = -dy*y_factor;
into
translation.z = -dy*z_factor;
Hope this helps
Hi there
I've been trying to change the default
MouseTranslate behaviour to work in the XZ plane. In the source code for
the method doProcess(MouseEvent) there are the following lines:
x =
evt.getX(); y = evt.getY();
translation.x =
dx*x_factor; translation.y = -dy*y_factor;
(*) transformX.set(translation);
In overriding it, I changed * to
translation.z =
-dy*y_factor;
But this didn't change anything, the object still
gets translated in the XY plane only. Am I going about this the wrong
way? It seems certain to me that this is the place where the transform
is set according to the mouse movement, is there another place?
Thanks
Rory
|