We are working on a distributed robot simulation system for the RoboCup
competition using (amongst other things) Java3D for rendering.

I have just read various messages on this group suggesting that where many
changes are to be made to a scene graph, these changes should be all done
in a behaviour.

I wonder if this also applies to offscreen rendering?  I would have
thought the Java3D thread that applies new transforms would not be
invoked until the render method was called - but am having alot of
difficulty determining if this is the case since their is no way to 'hook'
it.

Another question I hope could be answered regards view platforms.  We have
a single scene that different robots render from different positions at
different times, so have to attach the view as well.  Should this also be
in a behaviour.

Is there any information out their that describes in some detail the inner
workings of the Java3D threads?  The API specification is pretty light on
in the detail department.

This is our current rendering method (its syncronsized since multiple
robots can request renderings at the same time since the system is
multithreaded):

private synchronized void render(TransformGroup viewTransformGroup,
            Transform3D viewTransform,
            ViewPlatform platform,
            Transform3D projection, ImageComponent2D image) {

        // Is another camera requesting a rendering for a time at which
        // we have already calculated the position of our moving
        // components?
        if (lastCalculateTransformTime != currentTime) {
            lastCalculateTransformTime = currentTime;
            Iterator list;
            // Do we need to calculate all positions because the
            // simulation paused and a user modified the parameters of a
            // component?
            if (transformAll) {
                transformAll = false;
                list = nameToComponent.values().iterator();
            } else {
                list = nonFixedNameToComponent.values().iterator();
            }
            while (list.hasNext()) {
                TransformGroup t = (TransformGroup)list.next();
                PositionExtrapolator p = (PositionExtrapolator)t.getUserData();
                t.setTransform(new
                   Transform3D(p.getTransformAt(currentTime));
            }
        }

        // Apply the transform of the camera lens relative to the camera
        //body
        viewTransformGroup.setTransform(viewTransform);

        // Make this node the view platform
        view.attachViewPlatform(platform);
        view.setLeftProjection(projection);

        // Make the image the correct size
        java.awt.image.BufferedImage buf = image.getImage();
        canvas.getScreen3D().setSize(buf.getWidth(), buf.getHeight());

        canvas.setOffScreenBuffer(image);
        canvas.renderOffScreenBuffer();
        canvas.waitForOffScreenRendering();
    }


Finally, what is the significance of the Screen3D
setPhysicalScreenHeight/Width values.  Whatever values I put in seem to
have no significance.

Thanks in advance!

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to