At 11:02 04/06/99 -0400, you wrote:
>Hi,
> Suppose I am trying to view an object centered at the origin from the
point (0,0,5). And I wanna change my view point to (5,0,0) and view the
same object still centered at origin. Can anyone suggest a nice technique
for this. I have tried rotX(), rotY() methods for transform3D object.
>Thanx in advance.
>Vasu Suram
>
Get the view platform transform and store it somewhere, eg
viewTrans = u.getViewingPlatform().getViewPlatformTransform();
then you can manipulate it, such as
/*
* Restores the view transform, and hence the view, to its original value
*/
public void reset() {
Transform3D t = new Transform3D();
t.set (1, new Vector3d(0.0f, 2.0f, 25.0));
viewTrans.setTransform(t);
}
which I use to get back to a starting view position after I've been moving
around.
If you want to be able to navigate around, try MouseWalker in the attached
jar, heavily based on some code from David Nadeau. The java files are there
as well as the class files.
Tony
alb22a.jar