How do I force a redraw?

Hi,
my app is based on the InfiniteShadowVolumes demo.
I’m trying to initialise the viewer position and orientation when the window opens.
I’ve added the following method fragment call where I thought it would work:
public void initPosition()
{
Vec3f testv = new Vec3f(7.58f, 2.49f, 4.09f);
viewer.setPosition(testv);
Vec3f myVec3f = new Vec3f(0.92f, -0.09f, 0.37f);
Rotf myRotf = new Rotf(myVec3f, 0.005f);
viewer.setOrientation(new Rotf(new Vec3f(0, 1, 0), (float) Math.toRadians(45)));
viewer.update();
}

Sorry, I accidentally hit the post button before I was ready.
Anyway, the following code does not update my view.
How do I force my view or canvas to redraw the with the new postion and orientation?
Thanks
-j
Here is the corrected code fragment example:
public void initPosition()
{
Vec3f testv = new Vec3f(7.58f, 2.49f, 4.09f);
viewer.setPosition(testv);
viewer.setOrientation(
new Rotf(new Vec3f(0, 1, 0),
(float) Math.toRadians(45)));
viewer.update();
}

Caus,
Thanks for your reply, although I don’t want to force a redraw with an event. I just want to force a redraw after I’ve inited the position/orientation of my view only after the window first opens.
Also; the orientation updates correctly, it’s the setPosition() that’s not properly updated.
-j

Hi,

call the display(GLDrawable) method of your GLEventListener to redraw your scene.

ciao torsten

Problem sovled!
It turned out that the objectManip that I was using in the viewer.attach(drawable, NEW (BSphereProvider()…) was what was causing my viewer to have a wrong initial position.
When I replaced the objectMap.getTranslation() with my own new Vec3f(), that fixed the problem!
Note: The use of a BoundingSphere to init a viewer is a little misleading. The name implies the radius of your viewing volume. I didn’t realise it was using the position of the objectManip only after much debugging.
Thanks for your suggestions.
-j