> X-Originating-IP: [195.212.29.70]
> From: "Matthew Warren" <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: [java3d] Sphere and Shape3D
> Date: Wed, 14 Apr 1999 08:05:05 PDT
> Mime-Version: 1.0
> 

> 
> 1. my Sphere(); objects dont appear (I have set an appearance with
> material etc.., and also used default Sphere(), and default
> appearance(); but no joy.
> 
> Sphere sphere = new Sphere(0.4f);
> 
> I add the spheres to the transgroup with 
> 
> transgroup.addChild(sphere);
> 
> If I replace 
> Sphere sphere = new Sphere(0.4f);
>  with 
> Shape3D cube = new ColorCube(0.4f),
> Everything works fine.

The problem is the Sphere constructor you are using generates normals
for the geometry data and the default Appearance object supplied by the
Sphere primitive enables lighting.  This means you will not see anything
unless you add lights to the scene.

A quick way to fix this is to create an Appearance object and give it to
the Sphere constructor.  The default Appearance object has lighting disabled
so your sphere will be visible.  Try this:

        Appearance app = new Appearance();
        Sphere sphere = new Sphere(0.4f, app);



> 2. I originally thought all I had to do to get the spheres rotating
> around the central sphere was to create their rotationinterpolator
> behaviours, and when I translated the spheres they would rotate around
> the World Axes, but nope, they spin around their own axes staying in
> the same place! 

As you have discovered, all interpolators work in their own local
coordinate system.  You might want to look into using a
PositionPathInterpolator.

Dan Petersen
Java 3D Team
Sun Microsystems

=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 3D Home Page: http://java.sun.com/products/java-media/3D/

Reply via email to