Justin Couch wrote:
> Ok, but how is it effected by movements in the viewer's camera position.
> My understanding is that it just renders the geometry flat. VRML has an
> all encompassing background that changes as you move around with it. My
> impression of J3D's background is that it renders the outside of the
> object onto the back plane. So if I put a sphere into the background it
> would render the outside of the sphere, not the inside that we need. We
> also have to deal with top and bottoms so that if the user looks up,
> there is a texture there too that is different to each of the sides.
It is very easy to check out
BranchGroup group = new BranchGroup();
Appearance spa = new Appearance();
spa.setMaterial(new Material(new Color3f(255,0,0),new
Color3f(255,0,0),new Color3f(255,0,0),new Color3f(255,0,0),128f));
spa.setPolygonAttributes(new
PolygonAttributes(PolygonAttributes.POLYGON_LINE,PolygonAttributes.CULL_NONE,0));
Sphere sp = new Sphere(1f,Primitive.GENERATE_NORMALS,60,spa);
group.addChild(sp);
Background bg = new Background(group);
bg.setApplicationBounds(new BoundingSphere(new
Point3d(0.0,0.0,0.0), 1000.0));
objRoot.addChild(bg);
GENERATE_NORMALS and probably CULL_NONE are not needed, but I had not
time to experiment. Add this to any world and observe the result. Works
exactly in the way you would like it to work.
> Oh, that's not in the spec anywhere!
>From Background API
"It optionally allows background geometry---which is pre-tessellated
onto a unit sphere and is drawn at infinity---to be referenced."
Then it talks about what can and what cannot be placed there. Note the
'unit sphere' here - not the plane or something like this.
I know it is easy to find docs after the fact if you already know the
answer ;)
Artur
===========================================================================
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".